Last active
March 9, 2017 22:09
-
-
Save arozwalak/7336423 to your computer and use it in GitHub Desktop.
Javascript: 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
| function disableclick(event) | |
| { | |
| if(event.button==2) | |
| { | |
| return false; | |
| } | |
| } | |
| document.onmousedown=disableclick; |
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
| jQuery('img').bind('contextmenu', function(){ | |
| return false; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment