How to disable right click in Blogger or Website ?

How to disable right click in Blogger or Website ?



For disabling the right click in Blogger Post/Page or website there are two methods.

  1. By adding javascript to disable right click through layout.
  2. By adding a seperate code to Html tab while creating Post/Page.

 

By adding javascript to disable right click through layout

This method is used when we want to disable right click on each and every page so that no one can steal your data or copy your data from your Blog or Website.
Steps need to follow to perform this:

  • Login into your Blogger Account.
  • In left hand side you see the Layout tab.


 

  • Once you click Layout tab it will show a screen like below


 

  • Click on + Add a Gadget and choose HTML/Javascript Gadget from the list.



  • Once done Enter the name of the Gagdet  and in the script section write the script attached in the below embedded file.


 


<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>

  • Now your blog have successfully disabled right click.

 

By adding a seperate code to Html tab while creating Post/Page

Another way for disabling the right click on the seperate post of page is simply write the embedded code into your post in HTML tab as shown below while creating new post or page.

  • You can paste the code at the starting or at the end of the Post.



Download the code.

Loader Loading...
EAD Logo Taking too long?

Reload Reload document
| Open Open in new tab

Download [1.04 KB]

  • Same process do it for the separate Post if you don’t want to disable the right click for the whole Blog or website.

 


Thanks You