Created
June 28, 2019 09:44
-
-
Save zheeeng/32da0224528e04af6ba187a0832eb9b9 to your computer and use it in GitHub Desktop.
Disable right click
This file contains hidden or 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
['contextmenu', 'selectstart', 'copy'].forEach(function(ev){ | |
document.addEventListener(ev, function(event){ | |
return event.returnValue = false | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment