How to disable mouse right click

   To protect our own scripts, we may disable right click of computer mouse. This will prevent copying our articles/images etc published in websites or blogs very effectively. To work with this the readers browser must have java script enabled as it is a java script code to be placed on the webpage or template.
disable right click in blogger
  Just follow the steps to Right click protect your website or blogger blog.

Disable Right click in blogger or website

Step 1: Go to Blogger Dashboard >> Template >> Edit HTML.

Step 2: Convert the following Java script code by using converter tool and paste the converted code just before the tag "</head>".
<script language="javascript">
var message="
This function is not allowed here.";
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>




Step 3: Now Save template and your blog or website is right click disabled.
           If any one try to use right click the following error message will warn them.


how to disable right click in blogger

All Done !!!


Previous
Next Post »
Related Posts Plugin for WordPress, Blogger...