Skip to content

Instantly share code, notes, and snippets.

@warengonzaga
Created September 3, 2016 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warengonzaga/ab9a1f62ded1c71de2252e14239c1a9f to your computer and use it in GitHub Desktop.
Save warengonzaga/ab9a1f62ded1c71de2252e14239c1a9f to your computer and use it in GitHub Desktop.
Disable Script to Disable Chrome Features
$(document).keydown(function(event){
if(event.keyCode==123){
disabledAlert();
console.log("Disabled! By GhostGeekBinary");
console.log("Trying to press F12");
return false; // Prevent from F12
}
else if(event.ctrlKey && event.shiftKey && event.keyCode==73){
disabledAlert();
console.log("Disabled! By GhostGeekBinary");
console.log("Trying to press CTRL+SHIFT+I");
return false; // Prevent from ctrl+shift+i
}
else if(event.ctrlKey && event.shiftKey && event.keyCode==67){
disabledAlert();
console.log("Disabled By GhostGeekBinary");
console.log("Trying to press CTRL+SHIFT+C");
return false; // Prevent from ctrl+shift+c
}
});
$(document).on("contextmenu",function(e){
disabledAlert();
console.log("Disabled By GhostGeekBinary");
console.log("Trying to press the mouse click!");
e.preventDefault(); // Prevent from Inspect Element
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment