Friday, August 3, 2012

Disable Right Click on Blogger blogs


Paste the below code to disable right click anywhere in your blog.
  • Login into your blogger account
  • Goto Layout -->Add a Gadget [ You could add the gadget anywhere ]
  • Select HTML/JavaScript.
  • Add title for the script as ‘Right Click Disabled’ and paste the below code.

<script language=javascript>
<!--

function clickonNetScapeVer4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
}
}
}

function clickonIEVer4(){
if (event.button==2){
return false;
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown= clickonNetScapeVer4;
}
else if (document.all&&!document.getElementById){
document.onmousedown= clickonIEVer4;
}

document.oncontextmenu=new Function("return false")


// -->
</script>

No comments:

Post a Comment