Make it a toggle
This commit is contained in:
parent
363f9f675b
commit
0c2d23d029
1 changed files with 7 additions and 2 deletions
|
|
@ -68,6 +68,7 @@ export function createMainWindow() {
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
spellcheck: true,
|
spellcheck: true,
|
||||||
|
devTools: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -150,8 +151,12 @@ export function createMainWindow() {
|
||||||
) {
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
mainWindow.webContents.reload();
|
mainWindow.webContents.reload();
|
||||||
} else if(input.key=='F12'){
|
} else if (input.key === "F12") {
|
||||||
mainWindow.webContents.openDevTools({ mode: "detach" });
|
if (mainWindow.webContents.isDevToolsOpened()) {
|
||||||
|
mainWindow.webContents.closeDevTools();
|
||||||
|
} else {
|
||||||
|
mainWindow.webContents.openDevTools({ mode: "detach" });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue