Suppress right-click menu on a web site
-
Is there a way to disable the right-click menu on a particular web page I visit that isn't managed by me? I play a solitaire game on a particular web site fairly often. It's not a Flash game, nor is it a Java applet, I suspect it's simply JavaScript. The game allows you to use both left and right clicks, each performing different actions, but every time you right-click the normal browser right-click menu appears...very annoying in this context. Is there a way for me to tell my browser I don't want the right-click menu to appear on this one particular page (or its domain, if that's easier)? I have greasemonkey installed, so a GM script would be ideal, but I haven't been able to locate one. I'm on Windows, using FF. Thanks mucho for any ideas. (I could possibly write my own script if pointed in the right direction.)
-
Answer:
For Greasemonkey if(document.addEventListener) document.addEventListener('contextmenu', function(e) { e.stopPropagation(); }, false); else if(document.attachEvent) document.attachEvent('oncontextmenu', function() { event.cancelBubble = true; }); Set up a new user script and apply it to the appropriate domain, then copy and paste the above in.
maxwelton at Ask.Metafilter.Com Visit the source
Other answers
An easy way for you to do it would be to make a toolbar bookmark with javascript:void(document.oncontextmenu=new%20Function("return%20false"))in it. When you click on it up in your toolbar right clicking should be disabled for the page. Took me way longer to figure that out than it should have; I am apparently way too rusty with these things.
Stunt
Thanks! I was able to get Sparx solution to work a treat, but I could not get Stunt's to work, which may be more me than their solution.
maxwelton
Related Q & A:
- How To Make A Web Site?Best solution by Yahoo! Answers
- Is there a web site you can post comments about a business that sells products via the web. Like the BBB?Best solution by Yahoo! Answers
- How does someone make money owning a web site?Best solution by Yahoo! Answers
- How to remove items from the "right-click" menu?Best solution by Super User
- How to set up a web site?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.