noscripts backup

This commit is contained in:
Olivier Gagnon 2021-12-17 01:32:23 -05:00
parent b0929e3cff
commit 6c5842d2e7
2 changed files with 9 additions and 3 deletions

@ -9,8 +9,9 @@ if (greenworks.init()) {
const debug = false;
let win = null;
function createWindow(killall) {
const win = new BrowserWindow({
win = new BrowserWindow({
show: false,
backgroundThrottling: false,
});
@ -112,9 +113,14 @@ function createWindow(killall) {
}
app.whenReady().then(() => {
createWindow(false);
createWindow(process.argv.includes("--no-scripts"));
});
app.on("window-all-closed", function () {
app.quit();
});
app.on("before-quit", () => {
win.removeAllListeners("close");
win.close();
});

File diff suppressed because one or more lines are too long