Code Disable Right Click in Blogger

Code Disable Right Click in Blogger

Go to download


In this post I will show you how to disable right click on Blogger web pages. Code Disable Right Click in Blogger. Previously, we added block copy code in blogger blog, so that some people copy our content using right click and save our blog page offline, here we learn about "disable right click on blogger blog".

These are the steps that we will follow in today's explanation:

  • Step 1. Go to Format in Blogger Dashboard and click on Add Widget Link.
  • Step 2. Choose the HTML/JavaScript link.
  • Step 3. Paste the following code in the content area and then click the Save button.

<script language=JavaScript>
//Disable right mouse click Script
var message="No copying!";
function clickIE4(){
if (event.button==2){
return false;}}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;}}}
if (document.layers){
else if (document.all&&!document.getElementById){
}document.oncontextmenu=new Function("alert(message);return false")
// -->

  • Step 4. Go to your Blogger blog and test it by right clicking on the blog.

You can also add JavaScript code in template codes

To add this tool to the template code, go to the template and click on Edit HTML

 Then I search for the code and then paste the following code directly above the code </head>  </head> 

<script type="text/javascript">
if (document.addEventListener) {
document.addEventListener('contextmenu', function (e) {
}, false);
} else {
document.attachEvent('oncontextmenu', function () {
window.event.returnValue = false;

That's it, I hope you succeeded in adding the right-click disable code in Blogger.

image quote pre code