Sometimes we want to disable right click in our blog or website to avoid copying our content by third-party.Beecause third party can copy these contents to paste on their own site and it may be against adsense policy og google and your adsense account may be banned by GOOGLE
So Follow these steps to Disable Mouse Right click on Blogger or BlogSpot Blogs:
Step 1
Step 1
Login into blogger dashboard and Go to layout at left panel than click on add a gadget link as shown in below picture.
Step 2
When you click Add a Gadget link a popup window will open with all gadgets list. Please choose HTML/JavaScript gadget form list as shown in below picture.
Step 3
Past below code just inside it:
<script language=JavaScript>
<!--
//Disable right mouse click Script
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>
<!--
//Disable right mouse click Script
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>
Step 4
Save the gadget.
Step 5
Save the Layout.
0 comments:
Post a Comment