Home / Blogger / How to disable right click on blogger’s blog

How to disable right click on blogger’s blog

Today i’m going to show you how to disable right click on blogger’s blog.You can defend the posts of your blog by disabling right click.Most bloggers are using this trick to protect their posts.It is the best way to protect your blog posts.It has one disadvantage which is that if you disable right click on your blog then your sharing codes will not copy.So first think about this and then applied this trick on your blog.

Disable right click on blogger’s blog:How to disable right click on blogger’s blog

Step 1:

Login into you blogger’s account and click on layout and then click on add a gadget.

Step 2:

After completing first step a popup windows will open with all gadgets.Click on HTML/JavaScript from list.

Step 3:

Just paste the below code inside it.The below code will disable right click on blogger.

<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>

Step 4:

Now save the gadget and layout.

How to enable right click:

After disabling the right click you can easily re-enable right click  just by removing the code.Visit Blogger.com and go to template > Edit HTML.Now find and remove the code which we’ve just added.

If you like this post then share it with your friends with below buttons.

About tahir

Check Also

Convert Blogger blog to PDF

Convert Blogger blog to PDF

You can convert your blog posts to pdf with website.After converting all your blog posts ...

Stylish animated flash clock for blogger

Today i’am going to show you that how to add stylish animated flash clock for ...

Recent posts widget for blogger

Recent posts widget for blogger

Add recent posts widget to increase page views of your blog and tell your visitors ...