diff --git a/electron/main.js b/electron/main.js index 77bd9edb9..da1f0f16f 100644 --- a/electron/main.js +++ b/electron/main.js @@ -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); }); diff --git a/package.json b/package.json index 8ae4668b7..0805c51d6 100644 --- a/package.json +++ b/package.json @@ -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" } }