How To Disable Right Click in Blogger(blogspot) or Webpage

Posted by Lasantha Bandara on March 29th, 2009 File Under : java script7 Comments

This post explains how to disable right click on blogger(blogspot) or any other webpage using a html(javascript) code.
It is so annoying if someone copies(thefts) your blog posts,articles,images and another kind of information owned by you saying that they are the original owners of the content.
But,I think 'disabling right click' is not the right solution for that.
Most people come to your site to read information and very small percentage of people come to your site to steal your work,images,etc.So,most people feel it insulting and I think it's very unprofessional thing to do

If you want to protect your images,my suggestion is to add a Watermark(logo) of your sitename,or your name on the images,pictures,etc.

Note:Using this javascript code,you only disable the right click by warning the visitors that the content is copyrighted.

This is the code for this.

<SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>

Where to paste it in blogger ?

Sign in to your blogger dashboard-->layout-->Page Elements-->Add a Gadget-->html/javascript and paste the above javascript code and Save the changes.

How it works?

If you right click on the webpage,a message will pop up on screen saying "function disabled".If you want to change the message to you own one like "sorry....the work is copyrighted" or something like that,replace the "funtion disabled" text with your own message in the Javascript code.

File Under : java script

7 Responses to “How To Disable Right Click in Blogger(blogspot) or Webpage”

  1. zetamier says:

    it works! thank you so much for the simplest tutorial.

  2. Chandana says:

    It is cool, I have add it to my blog, check at http://www.tipsblaster.com . I will try more here

  3. Pravin says:

    Thanks a lot. It works.

    Have a nice day.

  4. Giulia says:

    Hi, a window come up with the message 'function disabled' but then i'm still able to copy the images… is there a why to stop that? thank you so much in advance.

  5. Sarah C. says:

    Thank you so much.

  6. Nizam Khan says:

    Excellent! This is very useful. Thanks for sharing the javascript code and tweeted 🙂

  7. Terri @ Terri's Table says:

    Thank you! It works perfectly.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.