Hacker News new | ask | show | jobs
by bryans 3995 days ago
This is obnoxious website behavior, and I equate it to sites ignorantly disabling right-clicking because they're paranoid someone will steal their photos. If your site contains any links at all, you should never, ever be breaking such basic browser functionality. The only possible legitimate use case would be a webapp which is attempting to create a desktop-style environment, and even then, co-opting the CTRL or ALT keys is likely not the best course of action.
1 comments

I disable right click on my Website.
I'll shift+right click all I want on your site. ;)
For what reason? This is easily bypassed.
If you visit his website [0] it's (at least I hope) intentionally poor designed, everything terrible straight from the late 90's in web design. From marquee, blinking, embedded mp3, and more.

There's a built-in bypass in the site.js to allow the context menu if shift is held, though you still get the alert. Or it's just that holding shift allows the context menu to appear after the alert. I don't actually know.

  document.body.oncontextmenu = function() {
    alert('Please dont right click!!')
    return window.event.shiftKey // top secret
   }
[0] bitfission.com
That is an amazing website, including the MP3-rendered MIDI, and I'm now pretty sure the comment was a joke that everyone missed :)