Is it possible to remove or disable "Inspect Element" context menu in Chrome App via Javascript?
I have searched through several forums but there are no definite answer.
I have one requirement for one page. In that page I want to block the user to perform below actions,
For this I googled, finally got the below link,
http://andrewstutorials.blogspot.in/2014/03/disable-ways-to-open-inspect-element-in.html
I tested with it with Chrome & Firefox. It's working for my requirement.
Right Click
<body oncontextmenu="return false">
Keys
document.onkeydown = function(e) {
if(event.keyCode == 123) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
return false;
}
}