Make it a toggle

This commit is contained in:
Amelia Frost 2026-04-04 12:35:06 -07:00
parent 363f9f675b
commit 0c2d23d029
No known key found for this signature in database

View file

@ -68,6 +68,7 @@ export function createMainWindow() {
contextIsolation: true,
nodeIntegration: false,
spellcheck: true,
devTools: true,
},
});
@ -150,9 +151,13 @@ export function createMainWindow() {
) {
event.preventDefault();
mainWindow.webContents.reload();
} else if(input.key=='F12'){
} else if (input.key === "F12") {
if (mainWindow.webContents.isDevToolsOpened()) {
mainWindow.webContents.closeDevTools();
} else {
mainWindow.webContents.openDevTools({ mode: "detach" });
}
}
});
const initialCustomFrame: boolean = config.customFrame;