How to Disable mouse Right Click and Hide Page Source

Newbie bloggers just surf Internet to compare the contents of different blogs. They Copy the contents of the Blogs they like. Being the New in blogging platform, they do not think how much time it had taken to write or make contents. This happens because they are new bloggers and want to become a successful blogger in no time. They are unknown that Google Adsense do not Approve the application having copy pasted contents. And when they fail in application they then came to know how much worse task they have done. You can say their blogs are dead, i.e. the fact is no more earnings from Google.

We actually are running more than 15 blogs around, when we were a new blogger earlier, we were the one of those who did copy and paste. And somehow with the passage of time we realize that our earlier blogs are now dead. So, we make up our mind that without copy pasting others contents, we will run our blog with Fresh/New contents. Now we are running more blogs and getting good response from Google Adsense. Therefore Guys, always write a new/fresh/unique contents to achieve pure goals and happy days comes, lol.

Hereafter, we have now new,fresh,unique contents in our Blogs. Our web page contents, we mean "page source" can be seen easily by doing mouse right click in blog/website. Viewing the page source others can steal your information from your Blog/Website. So, It's now headache to protect them from being copied/thept by other users. 

It's not possible to disable viewing a pages source. You can attempt to circumvent unaknowledgeable users from seeing the source, but it won't stop anyone who understands how to use menu's or shortcut keys. Your best bet is to develop your site in a manner that will not be compromised by someone seeing your source, If you're attempting to hide it for any other reason than to protect your intellectual property, then we would say you're doing something wrong.

Disadvantage of Disabling mouse right click:- 
  • Annoying Users 
  • Unprofessional 
  • Insulting to Users 
  • Pointless 
Lets come to the point - if you want to irritate Users playing with your blogs/websites, there are other, less controversial alternative solutions available to the problem protecting your images, contents, and source code.

Also Check:
  1. How to Disable right click context menu on images
  2. How to Prevent People From Copying Your Blog Contents

Disable mouse Right Click and Hide Page Source

To protect you contents, images, source code, etc, disable mouse Right Click and Hide Page Source. To do this, you require a HTMLJavaScript code which is given below;

<script language=javascript>
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!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&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// 
</script>
You will require above code later. Now follow below steps:
Step-1. Sign in your Blogger account
Step-2. Dashboard, go to Layout Option.
Step-3. In Layout Option, you will see "Add a Gadget", select it (See Demo below)


Step-4. After selecting "Add a Gadget", a popup window will be open (Add a Gadget window)
Step-5. Now Select "HTML/Javascript" Gadget. (See below Demo)


Step-6. Now add above HTML Script in Content Box. (See below Demo)


Step-7. Important Step - press the Save button. After saving you can drag the gadget wherever you want and click on Save Arrangement button.

Now you are done, check your blog Mouse right click function, it is now disabled. It will popup a message like below;


You are a genius. Yuppy...hurray !

Note: If you are irritated from above message being displayed and is annoying all the time when you do right click, to stop message displaying you should add below java script.

No right mouse click script !!! (no alert)

<script language=JavaScript>
<!--

//Disable right click script III- By Blogger Addict (addictofblogging.blogspot.com)
//For full source code, visit http://addictofblogging.blogspot.com

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>
We hope you liked our tutorial on Disabling mouse right click and hiding page source. If it helped just subscribe and like us on facebook. 

Enjoy !