disable reload of plugins on window created

This commit is contained in:
Araxeus
2021-04-28 02:46:13 +03:00
parent e4eed2e519
commit a229ba9c15

View File

@ -38,7 +38,7 @@ if (config.get("options.proxy")) {
// Adds debug features like hotkeys for triggering dev tools and reload // Adds debug features like hotkeys for triggering dev tools and reload
require("electron-debug")({ require("electron-debug")({
showDevTools: false, //disable automatic devTools on new window showDevTools: false //disable automatic devTools on new window
}); });
// Prevent window being garbage collected // Prevent window being garbage collected
@ -154,7 +154,7 @@ function createMainWindow() {
return win; return win;
} }
app.on("browser-window-created", (event, win) => { app.once("browser-window-created", (event, win) => {
loadPlugins(win); loadPlugins(win);
win.webContents.on("did-fail-load", () => { win.webContents.on("did-fail-load", () => {