Skip to content

January 21, 2010


Disabling right click menu on Timblr (and other websites)

Sometimes you just want to disable the right click menu on a webpage to stop the casual surfer nicking your pictures. You can do this by adding the following code to the webpage:

<script language=”javascript” type=”text/javascript”>

var message=”";

function clickIE()
{if (document.all)
{(message);return false;}}

function clickNS(e) {
if (e.which==2||e.which==3) {(message);return false;}}}

if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.  onmousedown=clickNS;}
{document.onmouseup=clickNS;document.oncontextmenu  =clickIE;}

document.oncontextmenu=new Function(“return false”)

This code needs to be added between the <head> HTML tag. NOTE: A HTML tag is a control/command word for generating web pages and is surrounded by the less than (<) and greater then symbols (>), examples are <head>, <b>, <img>


So how do you do this on Tumblr? Simple, login to your site and go to your home page (i.e., you should then see 2 options in the top right of the screen (Customize and Dashboard). Click on dashboard, which should bring up a menu at the top with info, theme, appearance, services and advanced. Click on custom HTML, this will then display a page with the script which generates your page. Insert the above code just after the <head> tag but before any other tag.

Read more from Misc
2 Comments Post a comment
  1. Oct 27 2010

    I have done exactly what you have instructed, and it still won’t work.

  2. Van
    Dec 15 2010

    Thank you for this! I followed your steps but have no luck? I purchased a theme from Tumblr, not sure if that makes any difference? Any other advice would be greatly appreciated.

Share your thoughts, post a comment.


Note: HTML is allowed. Your email address will never be published.

Subscribe to comments


This blog is monetized using Are-PayPal WP Plugin