Join me!

Cash n hits

Saturday

Want to make click right disabled on your Blog


Some web sites do not allow their visitors using right mouse click while pointer is on the blog area. This option is useful for the site and blog owners, who want to minimize the possibilities of the content direct copying to other posts.







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.

Right click on any internet browser is very important element and we must use it when it comes to copy or editing texts and etc. It’s very important when it comes to webmasters too. but some people may use it in a bad way, and you may want to make click right disabled on your blog. to protect you text, images links and others.



To setup this tool in your blog Copy the Following code and paste it to your blog by adding a new page element.


Step 1 : Go to Dashboard > Layout > Add Gadget > HTML / JavaScript
Step 2 : Copy the following code and paste it there .
Step 3 : Save the html/javascript and view you blog.


to put directly on template
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.
You might also like:

A message will appear to the persons trying to right click informing them right click is disabled..
Hope this post helped someone

No comments:

Post a Comment

Some comment were not showing up i have fixed that.. thank you

Cashcrate

Related Posts Plugin for WordPress, Blogger...