Home » » Disable right click

Disable right click

Now the major trick you can use to protect your content from copy and paste bloggers is to disable highlight function. I also shared a tutorial on how to disable right click context menu on images, which you can also use it to protect your blog images.
Ø  Go to your dashboard
Ø  Click Template > Edit HTML > Proceed
Ø  Use ctrl F to find </head> and paste the following code above </head>
<script type='text/javascript'>
 if (typeof document.onselectstart!=&quot;undefined&quot;) {
 document.onselectstart=new Function (&quot;return false&quot;);
}
 else{
 document.onmousedown=new Function (&quot;return false&quot;);
 document.onmouseup=new Function (&quot;return true&quot;);
}
</script>

Ø  Now save your template.

Ø  You can also add it, using this second option.
Ø  Go to Layout > Add a Gadget > HTML/JavaScript
Ø  Paste the following code in the content box leaving the title box empty.

<script language='JavaScript1.2'>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function (&quot;return false&quot;)
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>






Share this article :

0 comments:

Post a Comment

Recent Posts

पुराना पोस्टहरु

Nepali Date Convertor

 
Support : FOOT1 | FOOT2 | FOOT3 | FOOT4 | FOOT5 | FOOT6 | FOOT7
Copyright © 2011. Gaurab Shrestha | गौरब श्रेष्ठ - All Rights Reserved
Blog Design by Gaurab Shrestha Helped by Ram Sharan Shrestha
Proudly powered by BLOGGER