Today i
will tell you how to disable right click on your blog. It’s very usefull to
avoid user from copying your blog images, etc.
This is a
very simple tutorial but it can be disadvantage if you disable right click on
tutorials, code sharing blog because it will avoid newbie bloggers from copying
the shared tutorials as they use mouse to copy them. So first of all just think
about your blog content then move on implementing the mouse right click
disabling JavaScript code on your blog.
How To Disable Mouse Right Click on Blogger Blogs
1. Go to blogger dashboard --> Layout --> Add a gadget.
2. Choose Html/JavaScript gadget and paste the following peace of code just inside it.
Right click disabling JavaScript code
<script language=JavaScript>
<!--
//Disable right mouse click Script
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>
3. Save the gadget.
4. Save the layout.
That's it Now see your blog
If you like this Tutorial or Facing any Problem Regarding this then feel free to comment
Thanks
You May Also Like
How to Find Out Who Unfriended You On Facebook
How To Hide Last Seen Time On WhatsApp
11 Android Apps That You Must Install On Your Phone

0 comments:
Post a Comment