Have you every noticed that in some blog right click options is disabled and disabling the right click option in their blog doesn't allow any visitor to copy their content and this simple tool is useful for blog owners who want' to minimize the risk of copying their content directly. Right click on browser is very important when a user needs to copy some confidential information to their documents but some time people may use it in wrong way so disabling the right click option is one way to minimize the risk of copying your content without your permission. Also see how to disable right click on image.
How to add this script to blogger
Step 1: Go to Blogger Dashboard -->Select Layout-->Add Gadget-->HTML / JavaScript
Step 2: Copy the code given below.
Step 3: Save the HTML/ JavaScript and finally view your blog.
<script language=JavaScript>
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Function Disabled!";
///////////////////////////////////
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>
Note: Replace Function Disabled! with your own message like "No Right Click Allowed Here
0 Comments
We appreciate your comment! You can either ask a question or review our blog. Thanks!!