Main menu

Pages

How To Disable Right Click In Images On Blogger

                   
How To Disable Right Click In Images On Blogger


Now You can disable right click on all images or a single image.By this trick , You can prevent others from copying any image or a single image from your blogger blog .


Disable Right Click on All Images

1.  Log in to blogger account


2.  Go to Dashboard > Template > Edit Html.


3.  Find out  </head>
  using  Ctrl+F.

4. Copy and Paste the below code  after  </head>


         

<script type="text/javascript">
//<![CDATA[

function nocontext(e) {
var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
if (clickedTag == "IMG") {
alert(alertMsg);
return false;
}
}
var alertMsg = "Image context menu is disabled";
document.oncontextmenu = nocontext;
//]]>
</script>



5.  Now Save > Template.


Disable Right Click on a Single Image       

1.   Click on New Post.

2.  Then switch to HTML mode

3.  Then locate the image tag of the image which you want to disable then copy and paste the below code 

 oncontextmenu='alert("Image context menu is disabled");return false;'

Eg:- 
1. The Original Tag Image

<img border="0" src="YOUR IMAGE URL.JPG" />

2. Once you added the Tag, Then, It should Look Like below

 <img border="0" oncontextmenu="alert(&quot;Image context menu is disabled&quot;);return false;" src="YOUR IMAGE URL.JPG" />


reactions

Comments