Copycats are increasing day by day. To avoid this, Disabling right click is the Only way. By Disabling Right click, We can preserve our content about 60%. However, If you use Javascript, The User can disable all the Javascripts and can easily copy the Content and There is no Alternative for Websites. But, There is a Powerful Alternative for Bloggers. They can Disable Right Click without a Javascript.
How to Disable Right Click Without Javascript (Only for Bloggers):
- Go to Blogger > Template > Edit HTML and Find for the Following line.
<body
- Replace it with the Following code.
<body oncontextmenu='return false;'Now, Hit Save Template. That's it. Now, Right Click has been disabled in your Blog and Even though the Hackers use the Disable Javascripts method, It'll not work :) Enjoy!
Note: If you see the <body> tag as something like <body expr:class='"loading".....etc., Then add the oncontextmenu='return false;' in the Last like <body expr:class='"loading" + data:blog.mobileClass' oncontextmenu='return false;'> .
How to Disable Right Click With Javascript?
- For Bloggers: Go to Blogger > Template > Edit HTML and Find for </body> tag. Just above it Paste the Following code.
<script language=javascript>Now, Hit Save Template. That's it!
<!--
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>
- For Websites: In your Global Scripts section, Find for </head> tag. Just above it Paste the Following code.
<script>Now, Save the File. That's it.
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>