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 a
You can't.
Everything on a web page is rendered by the browser, and they want web sites to properly work on them or their users would despise them. As a result, browsers want to expose the lower level ticks of everything to the web developers with tools like code inspectors.
You could try to prevent the user from entering the menu with a key event. Something like this:
// Disable inspect element
$(document).bind("contextmenu",function(e) {
e.preventDefault();
});
$(document).keydown(function(e){
if(e.which === 123){
return false;
}
});
But if a user want to see the code, he will do it in another way. He will just need a little longer.
Short: If you do not want people to get something in their browser, you shouldn't send it to their browser in the first place.