Thursday, December 5, 2013

How To Disable Right Click On Blogger


By on Thursday, December 05, 2013

Learn how to disable right click on blogger.

Today you will learn how to disable right click on blogger/blogspot. By doing this you can protect your contents which means nobody will copy your contents or any kinds of stuff in your blog.

So do you really want to disable right click on blogger/blogspot then you have to follow simple and easy steps which is below.

1. Go to blogger dashboard.

2. Click on Layout.

3. Click on add Gadget then HTML/Javascript.
<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>
4. Now save your template and view your blog. Have a test try by clicking right click you will see a message
"Function disabled".
var message="Function Disabled!";
5. If you want to change "Function Disabled" to any other word. You can do it easily by following above step. 

Thanks!

About Rafay Ansar

Rafay Ansar is a young geek, freelancer writer, blogger, social media expert and author of MakeSomeSense. He writes about technology, Information and Securities, Web Development, Tips And Tricks, Blogging And Other Web resources.