Advertisement
izuemis

disable inspect for all keys

Sep 9th, 2022
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. -- DONT CREDIT ME FOR THIS I JUST FOUND IT IN A FORUM --
  2.  
  3. <script>
  4. // disable right click
  5. document.addEventListener('contextmenu', event => event.preventDefault());
  6.  
  7. document.onkeydown = function (e) {
  8.  
  9. // disable F12 key
  10. if(e.keyCode == 123) {
  11. return false;
  12. }
  13.  
  14. // disable I key
  15. if(e.ctrlKey && e.shiftKey && e.keyCode == 73){
  16. return false;
  17. }
  18.  
  19. // disable J key
  20. if(e.ctrlKey && e.shiftKey && e.keyCode == 74) {
  21. return false;
  22. }
  23.  
  24. // disable U key
  25. if(e.ctrlKey && e.keyCode == 85) {
  26. return false;
  27. }
  28. }
  29.  
  30. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement