I've been trying to figure out how to disable the devtools in Atom Shell. I've tried using a window event listener to no avail. It seems that the devtools-opened window event listener doesn't work. The devtools are still openable by Command+Option+I shortcut.
mainWindow.on('devtools-opened', function(){
mainWindow.closeDevTools();
});
In the end I went with Mousetrap and had to use a e.preventDefault() on a Cmd+Shift+I shortcut listener. I'd rather not have to include the Mousetrap library if it's unnecessary but as of yet I can find nothing.
Does anyone know of a better way?
Did you install a custom menu (i.e. overriding the default Atom Shell menu?) Once you do this, you'll actually have to explicitly implement the Devtools shortcut to get it to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With