Created
January 16, 2021 20:19
-
-
Save haroldao/46ac5de82d0192fd654fd9e84055e347 to your computer and use it in GitHub Desktop.
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
<!-- Disable keyboard keys --> | |
<script> | |
document.onkeydown = function(e) { | |
return false; | |
} | |
</script> | |
<!-- Disable images drag --> | |
<script> | |
window.ondragstart = function() { | |
return false; | |
} | |
</script> | |
<!-- Disable right click --> | |
<script> | |
var message="Function Disabled!"; | |
function clickIE4(){ | |
if (event.button==2){ | |
alert(message); | |
return false; | |
} | |
} | |
function clickNS4(e){ | |
if (document.layers||document.getElementById&&!document.all){ | |
if (e.which==2||e.which==3){ | |
alert(message); | |
return false; | |
} | |
} | |
} | |
if (document.layers){ | |
document.captureEvents(Event.MOUSEDOWN); | |
document.onmousedown = clickNS4; | |
} | |
else if (document.all&&!document.getElementById){ | |
document.onmousedown = clickIE4; | |
} | |
document.oncontextmenu = new Function("return false") | |
</script> | |
<!-- Disable text selection --> | |
<script> | |
onselectstart = (e) => {e.preventDefault()} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment