Created
April 9, 2015 17:04
-
-
Save huertanix/01c06b0f92b57e279271 to your computer and use it in GitHub Desktop.
Blocking right-click context menus in web browsers
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 () { | |
var blockContextMenu, myElement; | |
blockContextMenu = function (evt) { | |
evt.preventDefault(); | |
}; | |
window.addEventListener('contextmenu', blockContextMenu); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment