Last active
August 29, 2015 14:16
-
-
Save kossoff/8b73fa8ecd32606bbbb7 to your computer and use it in GitHub Desktop.
Disable right click & context menu for page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body oncontextmenu="return false"> | |
... | |
<script> | |
document.onmousedown=disableclick; | |
function disableclick ( event ) { | |
if ( event.button == 2 ) { return false; } | |
}; | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment