Something of Everything

How to disable right click in blog?

Worried about piracy? don’t want people to copy paste your work? here is the solution. you can disable right click n your blog . All you have to do is follow the below mentioned steps.
  1. Go to template window. click on template in left side column.
  2. click on EDIT HTML button. it is side by customize button.
  3. After </head> string,  write the code shown below.
<script type=’text/javascript’>
  var message= &quot; Sorry, you can not copy the content &quot;
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&amp;&amp;!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&amp;&amp;!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function(&quot;alert(message);return false&quot;)
</script>
4. Save template.
5. See your Blog.
6. Don’t forget to live your suggestion in comment box of this post.
7. Follow this blog to get more.  

Some more blog topics you may like to read:

  1. Remove Template View.
  2. Add followers gadget.
  3. Why one should blog?

Hope you find it useful. Comment if you have doubts or suggestions. Like, tweet and + post if you find it useful. follow us to get more.


Posted

in

,

by

Tags:

Comments

One response to “How to disable right click in blog?”

Leave a Reply