How To Make Disable Right Click of Mouse on Your blog Images

Disable Right click

Have you seen some website,on that website do not allow their visitor 
using right mouse click  on the blog images this option is very useful
for the website an blogger,but this action makes some loyal readers 
to feel depress with limited function  associated to the right click such 
as open link in new tab,bookmark this link etc ,
to make your blog /website disable right click on blog images
 just follow these step  

Make Disable right click of your mouse

  • log in your account
  • Click on the Template 
  • click on the edit html 
  • now find the </head> to find it press CTRL+F
  • Cop the below code past above </head> 

</script>

<script type=”text/javascript”>
//<![CDATA[
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Disable context menu on images by www.nafisflahi.com
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
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>

<

  • Image context menu is disabled you can change this with your own text 
  • this massage will be appear when anyone right click on your image  

Leave a Reply