From fae1f67a64aa972028b2720cca6a82c3c39c9d79 Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 15 Jan 2023 14:43:06 +0100 Subject: [PATCH 1/2] Remove deprecated code with electron v22 --- index.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/index.js b/index.js index 7e4e5980..fc2bfe98 100644 --- a/index.js +++ b/index.js @@ -317,17 +317,6 @@ app.once("browser-window-created", (event, win) => { win.webContents.on("will-prevent-unload", (event) => { event.preventDefault(); }); - - win.webContents.on( - "new-window", - (e, url, frameName, disposition, options) => { - // hook on new opened window - - // at now new window in mainWindow renderer process. - // Also, this will automatically get an option `nodeIntegration=false`(not override to true, like in iframe's) - like in regular browsers - options.webPreferences.affinity = "main-window"; - } - ); }); app.on("window-all-closed", () => { From 3c3530367a6f4760bc9730060fc9793a29bf4fa6 Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 15 Jan 2023 14:43:22 +0100 Subject: [PATCH 2/2] nit: trim trailing whitespace --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fc2bfe98..cbf3650e 100644 --- a/index.js +++ b/index.js @@ -189,7 +189,7 @@ function createMainWindow() { win.webContents.loadURL(urlToLoad); win.on("closed", onClosed); - const setPiPOptions = config.plugins.isEnabled("picture-in-picture") + const setPiPOptions = config.plugins.isEnabled("picture-in-picture") ? (key, value) => require("./plugins/picture-in-picture/back").setOptions({ [key]: value }) : () => {};