Hacker News new | ask | show | jobs
by willlll 3994 days ago
I disable right click on my Website.
2 comments

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 :)