Thursday, 16 July 2015

How to disable mouse right click function in Blogspot / Blogger ?

Disable right click in Blogger:function has been disabled

By this you can protect your blog images. follow these steps.
  •  Log in to Blogger Dashboard > >Layout >> Page Elements
  • Click on 'Add a Gadget' on the sidebar
  • Select 'HTML/Javascript' and add the code given below and click save.
<script language=javascript>
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>

Check it!!

0 comments:

Post a Comment