• ARTICLES
SEARCH

How-To Geek

Prevent Annoying Websites From Messing With the Right-Click Menu in Firefox

If you’ve spent any amount of time online, you’ve already run into a website that uses javascript to disable the right-click menu on the page… which can be really, really irritating for those of us that like to use the “back” feature on the context menu.

Why do they do this? Usually it’s a misguided attempt to keep people from viewing the source of their pages or stealing their images, but all they really do is end up annoying their readers into never coming back. Ever.

Hint: it doesn’t really stop anybody from stealing. It’s the tech equivalent of searching 85-year old grandmothers on airplanes for knitting needles. If you do it on your pages, stop it now.

Disabling Annoying Context Menu Javascript Nonsense

Open up the Tools \ Options panel, and then go to the Content “tab” on the top. You’ll see three buttons on the right-hand side, choose the one that says “Advanced”.

Firefox Options Window 

From this dialog you can uncheck the option for “Disable or replace context menus”. Note: If you also want to prevent websites from resizing your browser window, you can uncheck “Move or resize existing windows” while you are at it.

Firefox Advanced Javascript Settings

And now your context menu will work perfectly fine on the page.

Firefox Context Menu 

It should be noted that disabling this setting will prevent customized context menus from working on sites like Google Docs… so it’s a toss-up on which feature you like more.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 01/19/09

Comments (10)

  1. Big Dan

    I cannot tell you how many times I’ve had that annoyance come up. Not that I’m going around the net stealing page source or images. I have Hyperwords installed and need my right click menu to work.

    What always irks me is it in no way protects the source in Firefox Ctrl + U brings up the source in a new window, additionally Ctrl + F (find) brings up a search box to find what you want in the source. Similar functionaliy is available in every browser.

    Really the right click disable scripts do nothing but annoy technically adept users.

  2. Damian

    It also really messes up disabled peoples accessibility add ons and / or special browsers. I will let my disabled user groups know about this – another excuse to get everyone onto firefox ;)

  3. Bailey

    And for those of us who want to keep our customized Google Docs context menu, there’s a simple solution. Get Firebug for Firefox and use it to delete the right click script on your computer’s local copy. Alternatively (and I prefer), you can Adblock the script (if it’s external) that has the right click disbaling function. (Hey Mozilla, here something to add to FF 3.1…Be able to specify advanced JS options individually for each site, yet still have the global options!)

  4. lilsting10

    SWEET! I hate websites that resize your brower windows, I never even realised that option was built into FF3. Thank you.

  5. Andrew

    Thanks for the tip. Mine was already properly adjusted through the use of the Configuration Mania add-on.

    How about preventing websites from blocking access to the clipboard?

  6. Syahid A

    Sweet! I don’t know that we can do that in FF!

  7. Joyce

    Disabling right click sends the message, “We think you’re too stupid to figure out how to get access to our images and source code.” That’s all that does. If anyone doesn’t want stuff “stolen” then they need to never put it on the internet to begin with. Disabling right click is the silliest thing since pet rocks.

  8. bassmadrigal

    I have always used a bookmarklet. It is just some javascript code which will restore the context menu that you save as a bookmarklet.

    I added it below, but I am not sure if it will allow it to be posted.

    javascript:(function()%20{%20function%20R(a){ona%20=%20%22on%22+a;%20if(window.addEventListener)%20window.addEventListener(a,%20function%20(e)%20{%20for(var%20n=e.originalTarget;%20n;%20n=n.parentNode)%20n[ona]=null;%20},%20true);%20window[ona]=null;%20document[ona]=null;%20if(document.body)%20document.body[ona]=null;%20}%20R(%22contextmenu%22);%20R(%22click%22);%20R(%22mousedown%22);%20R(%22mouseup%22);%20})()

    I also have more that I found at this website
    https://www.squarefree.com/bookmarklets/

    I just created a folder on my bookmarks toolbar, and just dragged the bookmarklets that I wanted into it. Some of them can be extremely handy.

  9. null

    I use NoScript with Firefox for this. It was originally a security thing, but I’ve found it’s now more for convenience, allowing me to disable annoying javascripts while allowing ones that are useful (e.g. GoogleDocs) through

  10. Izkata

    Alternatively, most sites that do the alert popup do it in such a way that the right-click event goes undetected by the script if you do it a slightly different way:

    *Hold the left mouse button
    *Press and hold the right mouse button
    *Release the left
    *Release the right

Enter Your Email Here to Get Access for Free:

Go check your email!