Guest User

Untitled

a guest
Feb 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. // Desabilita F12
  2. document.onkeypress = function (event) {
  3. event = (event || window.event);
  4. if (event.keyCode == 123) {
  5. //alert('No F-12');
  6. return false;
  7. }
  8. }
  9. document.onmousedown = function (event) {
  10. event = (event || window.event);
  11. if (event.keyCode == 123) {
  12. //alert('No F-keys');
  13. return false;
  14. }
  15. }
  16. document.onkeydown = function (event) {
  17. event = (event || window.event);
  18. if (event.keyCode == 123) {
  19. //alert('No F-keys');
  20. return false;
  21. }
  22. }
  23. // Desabilita click derecho.
  24. var message="Sorry, right-click has been disabled";
  25. ///////////////////////////////////
  26. function clickIE() {if (document.all) {(message);return false;}}
  27. function clickNS(e) {if
  28. (document.layers||(document.getElementById&&!document.all)) {
  29. if (e.which==2||e.which==3) {(message);return false;}}}
  30. if (document.layers)
  31. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  32. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  33. document.oncontextmenu=new Function("return false")
Add Comment
Please, Sign In to add comment