Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is not a question like I'm web a developer, I want to block user from downloading picture from a web site.

Here is the issue, my three year old daughter loves to play on a web site that is pretty much a web site built completely on flash(almost no visible html content). She still has hard time using her tiny pink mouse and often instead of clicking left mouse button clicks the right one and than flash options dialog box pops up and I have to rush to laptop before she start crying.

I'm wondering if there is a way to inject some java script before page loads and disable flash options dialog. Something like Greasemonkey(chrome now has built in support to greasemonkey)? Solution for any browser (IE, Firefox, Chrome ) will do. I do not want to completely disable right mouse click on windows.

share|improve this question

migrated from Feb 26 '13 at 16:57

This question came from our site for professional and enthusiast programmers.

See if any of the links/suggestions here help:… – Danny Beckett Feb 26 '13 at 15:24
Get her a one button mouse? – jurgemaister Feb 26 '13 at 15:24
why not disable right click in windows when she uses the computer? – OptimusCrime Feb 26 '13 at 15:25
My Lil' One Button Mouse - Pink – mplungjan Feb 26 '13 at 15:26
Are you sure JS can disable Flash context menu? – strah Feb 26 '13 at 15:49
<script type="text/javascript">
var disabled_message = "";
document.oncontextmenu = function() 
   return false; 
document.onmousedown = function md(e) 
     if (event.button==2||event.button==3) 
        if (disabled_message != '')
        return false; 
  catch (e) 
     if (e.which == 3) return false; 

A script that i used on my websites. it is extracted from WYSIWYG ready to use JavaScript.

share|improve this answer
This works beautifully for me on a test webpage. – Xymostech Feb 26 '13 at 15:39
thanks but if you are a developer then i want to tell something about it. – Arpit Feb 26 '13 at 15:40
I can see why OP wants to block right click, but I can't understand why a developer would block it on a website. Now, when developers tools are built in every browser it's extremely easy for anyone (even my Dad can do this) to circumvent the obstacle. It only ruins user experience. – strah Feb 26 '13 at 15:46
@strah you can disable it to.. detect ctrl+shift+i. but the wrench menu option is really a problem ;). – Arpit Feb 26 '13 at 15:49

I've had the same problem with my daughter. What I've been doing is running some javascript through the console to disable the right click menu.

document.oncontextmenu = document.body.oncontextmenu = function() {return false;}

share|improve this answer

Your Answer


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