Jun
3

How to Disable Copy Paste and Right Click in Blogger Blog

06/03/2020 12:00 AM by Admin in Blogging


 

To protect content of our blogger blog, we will learn to disable copy paste and right click in blogger blog with the help of JavaScript codes.

When it comes to blogging, Blogger.com is one of the best free and easy blogging platform. Nearly everyone who are doing blogging knows about Blogger.

But as blogger is free platform, it is less customizable as compared to other platforms. It does not support plugins as wordpress does, but still we can make things work with few codes.

Why to Disable copy paste and right click in blogger?

As a blogger we write our own unique article by spending hours on it. But some blogger does not do the hard work and copies content from other blogs. It is very important that we should protect our work form such copy bloggers.

To protect our work, we can simply disable copy paste and right click to make it hard to copy content from our blog. But it is easy to disable copy paste and right click in wordpress, as there are many free plugins available to do it.

But what if we have to protect content of our blogger blog ? There is no such plugin support in blogger blog. So what should we do?

We can use a JavaScript code in our blogger blog to do the work of such plugins. Here are 2 JavaScript codes given below to disable copy paste and right click in blogger blog.

Disable Copy Paste in Blogger

You can use the following code to disable copy paste in your blogger blog. You just have to paste the following code in your blogger HTML/JavaScript sidebar widget.

Code:

<!- start disable copy paste --><script src='demo-to-prevent-copy-paste-on-blogger_files/googleapis.js'></script><script type='text/javascript'> if(typeof document.onselectstart!="undefined" ) {document.onselectstart=new Function ("return false" ); } else{document.onmousedown=new Function ("return false" );document.onmouseup=new Function ("return false"); } </script>
<!-- End disable copy paste --></!->


Disable Right Click in Blogger

You can use the following code to disable right click in your blogger blog. You just have to paste the following code in your blogger HTML/Javascript sidebar widget.

Code:

<script language=javascript>
<!--
//edit by safeseotools

var message="Right Click Not Allowed";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>

Steps to implement given JavaScript code in Blogger blog

Step 1:

Go to "Layout" section of blogger and click on "Add a Gadget" as shown in image below.

 

disable copy paste and right click step 1


Step 2:

Now select "HTML/JavaScript" gadget in list of all blogger gadgets as shown in image below.

 

disable copy paste and right click step 2


Step 3:

After "HTML/JavaScript" gadget opens, paste both "disable copy paste" and "disable right click" codes in Content section of that gadget.

 

disable copy paste and right click step 3 and step 4


Step 4:

After pasting both the codes in Content section of the blogger "HTML/JavaScript" gadget, click on Save as shown in above image. And DONE!

Now no one will be able to do copy paste or right click in your blogger blog. This code exactly works as disable copy paste or disable right click plugin available on wordpress.

 

Conclusion:

I have tried to be as informative as possible in this article. I hope that this trick will help you to protect your hardly written content by disabeling copy paste and right click in your blogger blog.

If you have any information or suggestion to improve this article, please do comment below to let me know.


leave a comment
Please post your comments here.