Created
September 27, 2021 21:41
-
-
Save 8dcc/fa12096604b0db29ad3a823984d27983 to your computer and use it in GitHub Desktop.
Block inspect shortcuts and 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
document.addEventListener('contextmenu', function(e) { | |
e.preventDefault(); | |
}); | |
document.onkeydown = function(e) { | |
if(event.keyCode == 123) { | |
alert(":^)") | |
return false; | |
} | |
if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) { | |
alert(":^)") | |
return false; | |
} | |
if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) { | |
alert(":^)") | |
return false; | |
} | |
if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) { | |
alert(":^)") | |
return false; | |
} | |
if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) { | |
alert(":^)") | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment