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.

Comments

comments

About tahir

Muhammad Tahir lives in Lahore, Pakistan. Loves to read and write articles about tech and web resources online.

Check Also

Add Social Sharing Buttons To Blogger Blog

Add Social Sharing Buttons To Blogger Blog

Do you want to get more page views and visitors?If yes then read this post.In …

Add Animated Flying Twitter Bird Widget to Blogger

Add Animated Flying Twitter Bird Widget to Blogger

Many bloggers are using Animated Flying Twitter Bird Widget.This is most popular widget.Animated Flying Twitter …

Customize Blogger label widget with CSS3

Customize Blogger label widget with CSS3

Customize Blogger label.Blogger label shows the list of categories of posts.Creating labels helps to find …

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 …