Translate This Blog
Remember To Always Back Up Your Template Before Attempting Any Of The Tweaks On This Site

Disable Right Click Blogger

Have people been stealing your images or content from your blog? Well with this script you can help protect your content by disabling the right click option. This script is not full proof and anyone who is computer literate will be able to get around this. However this will make it harder for people to steal your content and it may stop the idiots all together.

If you want the right click option to be disabled on all pages in your blog then follow the instructions below. If not then you can just place the code in the post that you want to disable it in. Make sure if you paste it in a post you do so in Edit HTML mode.

If you feel uneasy about adding coding directly into your template you can add this code into a HTML/javascript gadget instead. But its better to add it through your template for best results because some scripts may have a bleed over effect on your Page Elements as well. 

Design--> Edit HTML--> Ctrl+F--> Input </head> in the Find bar that comes up.

This should locate the </head> tag in your HTML page.

Place this code directly above the </head> tag.
<script type="text/javascript">
document.onmousedown=disable; //IE
message="Sorry no right click on this page!";
function disable(e)
{
if (e == null)
  { //IE disable
  e = window.event;
  if (e.button==2)
    {
    alert(message);
    return false;
    }
  }
document.onclick=ffdisable;  //FF
}
function ffdisable(e)
{
if (e.button==2)
  { //firefox disable
  e.preventDefault();
  e.stopPropagation();
  alert(message);
  return false;
  }
}
</script>
You can change the text in red to the alert message you wish to display when someone right clicks.

7 comments:

பலே பாண்டியா said...

Thank youuuuuuuuuuuuuuuuuuuuuuu
so much

Robin Robinson said...

Thanks so much for this. I had to mess about some to find where to put in the script, but it works. I even customized it! look and see, http://robins-chaos.blogspot.com

kriznizzel said...

Hi I tried to find this but could not locate the head tag? would it be because of the template I use? kriznizzel/blogspot.com/
Thanks

diary said...

thank for your sharing
curry on friend...:)

ZEEJAJA SHOPPE said...

thanks...great job...

Elizabeth Taylor said...

unfortunately this did not work for me when I tested it :(

AiresOFwar said...

You might have JavaScript disabled on your browser or your browser does not support it.

Post a Comment

Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.

Web Design Blogs