How to disable right click in blog | Adsense, Seo, Blogging and Tricks How to disable right click in blog - Adsense, Seo, Blogging and Tricks

May 6, 2014

How to disable right click in blog

Leave a Comment




              Disabling right click on a website wont make your website secure and copy right free, but this will reduce the possibility of being copied from your web to internet. Disabling right click in blog prevents users from copying the html and css codes but you can't stop any one if they have just disabled javascript because this method is based on simple java script. Any way follow the way to implementing into your blog



 Disable right click


  • Log into blogger -> layout
  • Add new gadget -> Javascript and paste the below code into it

<script language="JavaScript">
<!--

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>


  • Js will disable right click without any notice
But some templates have full of javascripts and this will force the user to enable js to access your blog , but this is not recommended and also this will make you to loose one or few valuable visitors.


  Like Us on Facebook for more updates
                                                   

0 comments:

Post a Comment