How To Disable Right Click in Blogger or Blogspot Blogs

6 replies
  • WEB DESIGN
  • |
  • Just Log into your blogger dashboard.
  • Navigate to your blogger Layout --> Page Elements page.
  • Add a new widget by navigating to Add a Gadget >> HTML / JavaScript
  • Add the following code to HTML / JavaScript box.
-------------------------------------------------------------------------------------
<script language=JavaScript>
<!--

//Disable right mouse click Script
// For full source code SEO Company | SEO Services | Web Design and Development | Data entry

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!docume nt.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>
-------------------------------------------------------------------------------------
#blogger #blogs #blogspot #click #disable
  • Profile picture of the author tweewoo1
    I have tried with this code. Really helpful posting.
    {{ DiscussionBoard.errors[6898068].message }}
  • Profile picture of the author i580n
    Thanks for this code. Definitely will be saving this for future use.
    {{ DiscussionBoard.errors[6904227].message }}
  • Profile picture of the author Dan Grossman
    Why do you want to disable right click? It doesn't actually stop anyone from copying things, but it does piss off people that want to, say, right click then click "open in new tab", or right click then click "translate to [language]", or anything else they've put in their context menu.

    This is bad practice, you shouldn't do it.
    Signature
    Improvely: Built to track, test and optimize your marketing.

    {{ DiscussionBoard.errors[6905314].message }}
    • Profile picture of the author Ron Killian
      Originally Posted by Dan Grossman View Post

      Why do you want to disable right click? It doesn't actually stop anyone from copying things, but it does piss off people that want to, say, right click then click "open in new tab", or right click then click "translate to [language]", or anything else they've put in their context menu.

      This is bad practice, you shouldn't do it.
      I agree 100%! I find it so annoying when I can't right click.

      Like Dan said, not like it's going to keep any one from taking anything.
      Signature
      PLR Affiliate Program Has Launched! Easily Promote Over 5,000 PLR and MRR Products.

      Largest Selection of PLR Articles on the Planet! PLR Ebooks, PLR Video, PLR Websites and more with Private Label Rights
      {{ DiscussionBoard.errors[7347605].message }}
  • Profile picture of the author interserverx
    It is really useful. I am bookmarked your page and it will be use for future
    {{ DiscussionBoard.errors[6924656].message }}
  • Profile picture of the author umbraco01
    Yes i have tried with this code it is really working good. Thanks for sharing such a useful thing.
    {{ DiscussionBoard.errors[7345955].message }}

Trending Topics