fix killall steam not working

This commit is contained in:
Olivier Gagnon 2021-12-14 22:34:09 -05:00
parent 5b38ee3cfb
commit e3a0caf50f
2 changed files with 6 additions and 5 deletions

@ -9,14 +9,15 @@ if (greenworks.init()) {
const debug = false;
function createWindow() {
function createWindow(killall) {
const win = new BrowserWindow({
show: false,
});
win.removeMenu();
win.maximize();
win.loadFile("index.html");
noScripts = killall ? { query: { noScripts: killall } } : {};
win.loadFile("index.html", noScripts);
win.show();
if (debug) win.webContents.openDevTools();
@ -75,7 +76,7 @@ function createWindow() {
if (intervalID) clearInterval(intervalID);
win.webContents.forcefullyCrashRenderer();
win.close();
createWindow();
createWindow(true);
},
},
],
@ -110,5 +111,5 @@ function createWindow() {
}
app.whenReady().then(() => {
createWindow();
createWindow(false);
});

@ -109,6 +109,6 @@
"test:watch": "jest --watch",
"watch": "webpack --watch --mode production",
"watch:dev": "webpack --watch --mode development",
"electron": "cp -r electron/* .package && cp index.html .package && cp main.bundle.js .package && cp dist/vendor.bundle.js .package/dist && cp -r dist/ext .package/dist/ext && electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png"
"electron": "cp -r electron/* .package && cp index.html .package && cp main.bundle.js .package && cp dist/vendor.bundle.js .package/dist && cp -r dist/ext .package/dist/ && electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png"
}
}