mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-17 05:58:41 -09:00
Always open the DevTools in the detached mode – closes 1173
This commit is contained in:
parent
bbd14bca09
commit
a0a8484158
1 changed files with 6 additions and 1 deletions
|
|
@ -211,7 +211,12 @@ module.exports = ({createWindow, updatePlugins}) => {
|
||||||
accelerator: accelerators.toggleDevTools,
|
accelerator: accelerators.toggleDevTools,
|
||||||
click(item, focusedWindow) {
|
click(item, focusedWindow) {
|
||||||
if (focusedWindow) {
|
if (focusedWindow) {
|
||||||
focusedWindow.webContents.toggleDevTools();
|
const webContents = focusedWindow.webContents;
|
||||||
|
if (webContents.isDevToolsOpened()) {
|
||||||
|
webContents.closeDevTools();
|
||||||
|
} else {
|
||||||
|
webContents.openDevTools({mode: 'detach'});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue