-
-
Save spatialy/f6bcfb86a329ca3f5ca694662fcba0c5 to your computer and use it in GitHub Desktop.
Script to disable the right click and inspect elemt of any browser :
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
$(document).keydown(function(e) { | |
return 123 == e.keyCode ? !1 : e.ctrlKey && e.shiftKey && 73 == e.keyCode ? !1 : void 0 | |
}), document.addEventListener("contextmenu", function(e) { | |
e.preventDefault() | |
}), document.onkeydown = function(e) { | |
return !e.ctrlKey || 67 !== e.keyCode && 86 !== e.keyCode && 85 !== e.keyCode && 117 !== e.keyCode ? !0 : !1 | |
}, $(document).keypress("u", function(e) { | |
return e.ctrlKey ? !1 : !0 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment