How to disable right click on blogger blog

Posted by Unknown 0 comments
How to protect your blog content from being copied.Tutorial on how to disable right click on blogger blog.Have you noticed, that some web sites do not allow their visitors using right mouse click while pointer is on the blog area. This option is useful for the site and blog owners, who want to minimize the possibilities of the content direct copying to other blog posts.

Provided cross browser DHTML script from dynamic drive will help you achieving the same result on your own blog, preventing default right menu from popping up when right mouse is clicked. There are actually two options for this script are provided: Alert Option and Non-alert Option. If the Alert Script is enabled, if someone tries to execute Right click on the blog, then a Message, which can be customized per your desire, appears. If the Non-alert script is activated, then no message is displayed.

To setup this tool in your blog Copy the Following code and paste it to your blog by adding a new page element.

Message Alert Script:
/*genuinecontent.blogspot.com*/
<script language=JavaScript>
var message="Sorry!! No right click.";


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>



Message Non-Alert Script: 

/*genuinecontent.blogspot.com*/
<script language=JavaScript>
var message="";
function clickIE() {if (document.all)
{(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.
all)) {
if (e.which==2||e.which==3) {(message);return
false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmo
usedown=clickNS;
}
else{document.onmouseup=clickNS;document.oncontextmenu
=clickIE;}
document.oncontextmenu=new Function("return false")
</script>

steps to use the code in Blogger blog: 

1.Go to Design tab
2.Click on add a gadget
3.Select HTML/Javascript
4.Paste the above code and save the template and you are done