-1

I noticed that on spotify.com on Google Chrome you cannot bring up the right mouse click menu in the album area. There's nothing and the right mouse click simply doesn't work.

How do they do that? I've never seen such a thing

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
  • The “usual” way is to use JavaScript to cancel/replace the right-click default behavior. (E.g.: http://500px.com/photo/40422994?from=popular) – Alex Jul 16 '13 at 09:52

1 Answers1

2

An answer at StackOverflow:

You can do so with Javascript and/or an HTML attribute (which is really a Javascript event handler anyway) as described here:

<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(e)
{
  if(event.button==2)
   {
     alert(status);
     return false;    
   }
}
</script>

and

<body oncontextmenu="return false">
...
</body>
Community
  • 1
  • 1
Kiet Ho
  • 67
  • 2
  • 3