0

How to disable the right mouse button in Blogger

Share
advertisement

If you want to protect your blog from stolen content and images, and you should use this method to make the visitor not be able to copy something or someone who steals your content or images, please follow the method well.

Using the code for how to disable the right mouse button in the blogger will lead to the appearance of an alert message containing what you want to tell the visitor when he clicks the right mouse button. You can write the content of the message as you wish, and there are examples:

  • You cannot copy this content because it is completely safe
  • You cannot use the copy in this article
  • Function disabled
  • We do not allow copying of content or images on our site
  • We try to keep the content from being stolen, so you can’t copy it. Only readers can

How do I install the code

  1. Go to The site : Blogger.com
  2. You have to choose: Layout
You have to choose: Layout

Now you have to copy this code

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

After copying the code, we will return again to the page: Layout

We will click on: Add a Gadget

We will click on: Add a Gadget : As shown in the pictures

After that we will choose: HTML/JavaScript HTML/JavaScript Add third-party functionality or other code to your blog.

HTML/JavaScript HTML/JavaScript Add third-party functionality or other code to your blog.

Then put the code and click save now:

Add the Code in Add a Gadget

How can I modify the message

Inside the code this line appears

var message=”Function disabled”;

You can now edit this “Function disabled” sentence only in the message that you want to show to the visitor.

In this way, the add-on works on your site without problems, and if you want to remove it, you just have to remove the code that was added in : Layout

advertisement