Disable Developer Tools from JQuery and javascript in Chrome, Firefox and IE

Estándar

devtools

Sometimes you need to disable Developer Tools on browsers to prevent problems in critical web apps. Although these techiques not block the contextual menu of each browser itself, you can turn off the key shortcuts for each browser and F12 or right click.

However if you are IT Manager, you can disable developer tools in Chrome from user data. http://stackoverflow.com/questions/5692006/how-to-uninstall-remove-developer-tools-from-google-chrome

Add your know-how in comments.

<script type="text/javascript" language="Javascript">

 
 function right(e) {
 if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) {
 alert(' Right Click ');
 return false;
 }
 else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)) {
 alert(' Right click ');
 }
 }
 $(document).keydown(function (event) {
 var keys = [123, 16, 17, 67, 74, 73, 83, 81, 75, 118, 116];
 var keysCtrlShift = [67, 74, 73, 83, 81, 75];
 var keysOnlyShift = [118, 116];
 
 if ($.inArray(event.keyCode, keys) > -1) {
 //F12
 if (event.keyCode == 123) {
 return false;
 }
 //Ctrl + Shift
 if (event.ctrlKey && event.shiftKey && $.inArray(event.keyCode, keysCtrlShift) > -1) {
  return false; 
 }
 //Shift + F7 o F5 -- Firefox
 if (event.shiftKey && $.inArray(event.keyCode, keysOnlyShift) > -1) {
  return false;
 } 
 
 } 
});
 document.onmousedown = right
 </script>