Created
February 7, 2018 10:20
-
-
Save kirasiris/dd60b9b317ee5f704623b57c1a4b8d83 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
// Desabilita F12 | |
document.onkeypress = function (event) { | |
event = (event || window.event); | |
if (event.keyCode == 123) { | |
//alert('No F-12'); | |
return false; | |
} | |
} | |
document.onmousedown = function (event) { | |
event = (event || window.event); | |
if (event.keyCode == 123) { | |
//alert('No F-keys'); | |
return false; | |
} | |
} | |
document.onkeydown = function (event) { | |
event = (event || window.event); | |
if (event.keyCode == 123) { | |
//alert('No F-keys'); | |
return false; | |
} | |
} | |
// Desabilita click derecho. | |
var message="Sorry, right-click has been disabled"; | |
/////////////////////////////////// | |
function clickIE() {if (document.all) {(message);return false;}} | |
function clickNS(e) {if | |
(document.layers||(document.getElementById&&!document.all)) { | |
if (e.which==2||e.which==3) {(message);return false;}}} | |
if (document.layers) | |
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} | |
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} | |
document.oncontextmenu=new Function("return false") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment