Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Many websites have started replacing the right-click context menu with one of their own. Firefox lets me choose whether a website can disable Firefox's menu, but not much else.

Neither value of the Firefox's setting is acceptable: allow it to be blocked, and I can never access some of the features on some websites. Disallow, and I have two menus on every website that uses this feature legitimately:

                                              Looks familiar?

Is there an addon that would solve this problem elegantly? For example, by letting right-click do what the site wants, but making Ctrl+Right Click always show the Firefox menu?

share|improve this question
    
Where is the option to enable/disable this feature? Or do you actually have to navigate to a website that attempts to override the right-click context menu? –  w3d Dec 8 '11 at 17:21
    
@w3d that option is here: imgur.com/Sm2H4 –  romkyns Dec 8 '11 at 17:48
    
Ah OK thanks. The default option appears to be to "Allow scripts to... disable or replace context menus" –  w3d Dec 8 '11 at 18:23
    
What specific website is this? The websites where I have noticed this behavior, only showed the website's custom menu. –  Simon Verbeke Dec 8 '11 at 19:05
    
@Simon of course, because the setting is enabled by default. Disallow disabling the context menu and you'll see it. Websites that come to mind are Google Docs and NewsBlur. Websites that abuse this setting include various lyrics websites, disabling the menu without replacing it. –  romkyns Dec 8 '11 at 20:12

5 Answers 5

Partial solution, but better than nothing:

With Toolbar Buttons, you have an additional button Toggle JavaScript on/off that you can add to any toolbar in Firefox.

Then, you set Firefox to allow to replace context menus by the sites.

When you don't like context menu provided by the site you're on, you toggle JS off - then, on right-click you have original Firefox menu. Toggle on and you have site's menu back.

Remember however that when the page loads, you should probably have JS turned on, otherwise you may have to reload the page for certain onload JavaScripts to be invoked.

BTW. The Toggle JavaScript on/off button, contrary to Stop Flash button, does not kill JavaScript, only let's call it "pauses it". You have to use both to see the difference ;) "Stop Flash" will kill all preloaded YouTube videos for instance, and after switching it back on, all the Flash content will have to be reloaded. JavaScript is only paused.

share|improve this answer
    
Sounds like it's worth a try, thanks! –  romkyns Dec 27 '11 at 20:30

If you have a keyboard with a context menu button (to the right of the space bar on most English keyboards) you can always display the default applications context menu (ie. the browsers context menu) by hitting this key.

Context menu key on the keyboard

If you have a 3 (or more) button mouse then you could configure one of the other buttons to display the applications context menu (more commonly displayed with the right mouse button).

share|improve this answer
    
Yes but... the contents of this menu depend on what I right-click on. Try this: right-click on the image you inserted. There is a "View Image" menu item. Now try to achieve the same with the Menu key. Impossible. –  romkyns Dec 10 '11 at 17:16
    
@romkyns: Ah, yes that is true. The Apps key would seem to display the context menu for whatever page element (in the browser at least) has focus. Whilst this might work for anchors and some other tab-able elements, images do not seem to receive focus, so their context menu cannot be accessed by the keyboard? (Aside: I wonder how this affects accessibility for keyboard-only users?) –  w3d Dec 10 '11 at 18:24

For what it's worth I have same issue dealing with hotmail.com it has a context menu override and I only want that site to be able to override the context menu (right mouse click) not EVERY SITE. It looks like a button to disable javascript (or should I say "pause") the intercepts seem like one work around.

I use Opera as a secondary browser as it has a "site prefences" where you can configure a per site override to stop context menu intercepts when you find a site that is deliberately blocking/overriding the standard context menu (copy, cut, paste etc). This is what Firefox needs.

share|improve this answer

You can disable Javascript changing the context menu per site, if you use a Greasemonkey script: http://www.orbona.com/greasemonkey/show.php?gscript=15 You can include or exclude pages as you like.

// ==UserScript== 
// @name Enable Context Menu 
// @description Restore context menus on specific sites that try to disable them 
// @namespace http://www.orbona.com/greasemonkey/ 
// @include http://*marktplaats.nl/*
// @include http*
// @exclude http*://maps.google.com/*
// ==/UserScript== 

function doIt() { 
    unsafeWindow.document.onmousedown = null;
    unsafeWindow.onmousedown = null;
    unsafeWindow.document.oncontextmenu = null;
    unsafeWindow.oncontextmenu = null;
if (document.all) { 
    allElemsCount = document.all.length;
    for (var i = 0;i < allElemsCount;i++) { document.all[i].setAttribute("oncontextmenu", "return true;");
    document.all[i].setAttribute("onmousedown", "return true;");
    document.all[i].setAttribute("onmouseup", "return true;");
} } 
else { 
    allElems = document.getElementsByTagName('*');
    allElemsCount = allElems.length;
for (var i = 0;i < allElemsCount;i++) { 
    allElems[i].setAttribute("oncontextmenu", "return true;");
    allElems[i].setAttribute("onmousedown", "return true;");
    allElems[i].setAttribute("onmouseup", "return true;");
} } } 
window.addEventListener("load", function() { doIt();
}, false);
share|improve this answer
    
Well yeah, but the page in question has a useful right-click menu. I can't just turn it off without losing a lot of functionality. Google Docs Spreadsheet is another such example. –  romkyns Jul 2 '12 at 9:16

I've tried it, and it works properly. No custom menu on Google docs nor on NewsBlur. The menu you showed in the picture, is a drop down menu and not a right-click menu.

Also, make sure you've installed the latest version.

share|improve this answer
1  
-1 It works properly, but there IS a custom (context) menu on NewsBlur. The (green) menu shown in the picture is a drop down menu AND is also available as a right-mouse context menu, overriding the default. This is using FF8 with default settings (which permits scripts to replace context menus - the right mouse onclick event). IMO NewsBlur should not be overriding the context menu in this instance, since the same menu is already available via the drop down. Google Docs also has a context menu when in the document itself. –  w3d Dec 9 '11 at 12:25
    
This is just a drop down menu that's activated with right-clicking. If it were a right-click menu, it would open at the mouse's location. Google Docs does not override it when I tell FF not to allow this. –  Simon Verbeke Dec 9 '11 at 12:31
    
"This is just a drop down menu that's activated with right-clicking." - Yes, but in doing so it has overridden the applications default context menu (which is also opened by right clicking). It only opens at the mouse's location if the developer has specifically programmed it to do so. –  w3d Dec 9 '11 at 16:51
    
No it does not override it, because it isn't a right-click menu. –  Simon Verbeke Dec 9 '11 at 19:10
    
What do you mean "it does not override it"? If you right-click anywhere in the navigation area on the left on NewsBlur you get the green popup menu, you do not get the browsers default context menu, it has therefore been overridden. (Unless you have specifically unchecked the option in Firefox to prevent such behaviour.) –  w3d Dec 9 '11 at 19:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.