Web Toolbar by Wibiya Tec N Tricks: Disable RightClick On Blog And Website

Tuesday, 14 February 2012

Disable RightClick On Blog And Website

To prevent the contents of blog from  the other peoples that have bad actions like copied post or images, many bloggers deliberately to disable right click on their blog. Well, today I will share a blogger tutorial about how to disable right click on your blog.

Ok. 
To disable right click on your blog please follow the instruction bellow:
  • Login to your blogger account Or WebSite.
  • Go to Template menu, and then click Edit HTML, and click Proceed.
  • Check Expand Widget Template.
  • Find the <head> code. To make easy it, click Ctrl+F if you using Mozilla Firefox browser, and F3 if using Internet Explorer or Google Chrome browser.
  • Or Add A widget By Editing Layout.
  • Paste the JavaScript code just below the <head> code. This is the JavaScript code to use.
<script language=JavaScript>
<!--
//Neway4U
var message="";

///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>

Now Save It And Its Done.
Now Rightclick On Your Blog Will Give A Message To User.And Your Website Source Will Be Safe.
Obviously Its Not A Perfect Solution Because Its Client side Scripting, But Better Than Nothing. :)

No comments:

Post a Comment