As a user, how can one disable right click on flash for certain web site

5

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 abcmouse.com 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.

imachabeli

Posted 2013-02-26T15:21:40.567

Reputation:

See if any of the links/suggestions here help: http://www.kirupa.com/forum/showthread.php?87099-How-to-disable-right-click-in-Flash

– Danny Beckett – 2013-02-26T15:24:16.893

Get her a one button mouse? – Jørgen R – 2013-02-26T15:24:54.330

you want to disable the right click that page only. ? – Arpit – 2013-02-26T15:25:33.490

2why not disable right click in windows when she uses the computer? – None – 2013-02-26T15:25:58.913

2My Lil' One Button Mouse - Pink – mplungjan – 2013-02-26T15:26:33.780

I could not imagine there is a special kids mouse, got ChesterMouse Children's Computer Mouse, thank to mplungjan – None – 2013-02-26T15:39:19.367

Just grab a disable-right-click script and put it in a bookmarklet. Run the bookmarklet after landing on the page and she should be good to go. It will only be disabled for that page. – None – 2013-02-26T15:46:55.553

1Are you sure JS can disable Flash context menu? – strah – 2013-02-26T15:49:53.167

@strah if not, just paint a transparent div over the page that blocks right clicks but allows regular clicks through. – None – 2013-02-26T15:56:53.480

how about learning her how to get rid of the popup. A three year can learn that and in the proces learn a little independence too – Rune FS – 2013-02-26T16:50:46.733

Answers

2

<script type="text/javascript">
var disabled_message = "";
document.oncontextmenu = function() 
{ 
   return false; 
}
document.onmousedown = function md(e) 
{ 
  try 
  { 
     if (event.button==2||event.button==3) 
     {
        if (disabled_message != '')
           alert(disabled_message);
        return false; 
     }
  }  
  catch (e) 
  { 
     if (e.which == 3) return false; 
  } 
}
</script>

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

Arpit

Posted 2013-02-26T15:21:40.567

Reputation: 167

This works beautifully for me on a test webpage. – Xymostech – 2013-02-26T15:39:11.200

thanks but if you are a developer then i want to tell something about it. – Arpit – 2013-02-26T15:40:01.780

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 – 2013-02-26T15:46:21.107

@strah you can disable it to.. detect ctrl+shift+i. but the wrench menu option is really a problem ;). – Arpit – 2013-02-26T15:49:56.153

0

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;}

lemel

Posted 2013-02-26T15:21:40.567

Reputation: 1