Thursday, December 8, 2011


How to Disable Right Selection Key In Blogger

Right selection key enable one to copy highlighted area(s). For publishers, it is not ideal to copy content from a website without placing a link back to the site and for this reason most site owners prefer to disable right selection key in their site.



Follow this simple steps to disable the right selection key in blogger

  1.  Log in  to your blog
  2. Go to design
  3. Click on Add a gadget
  4. Select HTML gadget
Do not name the gadget just copy the code below and paste in it


var message="Function Disabled!";

<script language="JavaScript">

<!--Disable Right Mouse 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")

<!--Onyekachi -->

</script>

Save the gadget and you are good to go.
A click on view blog will take you straight into you home page highlight some text and see if you can copy it, can you? I believe the answer is NO.

No comments:

Post a Comment

 
Scroll To Top