From dbdff38d2e4cfbbda44a4eb875372789c41e5b33 Mon Sep 17 00:00:00 2001 From: eouia Date: Mon, 30 Aug 2021 11:32:24 +0200 Subject: [PATCH] Add custom switches for electron mainWindow --- js/electron.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/electron.js b/js/electron.js index 36b3d352..6adb87b6 100644 --- a/js/electron.js +++ b/js/electron.js @@ -19,7 +19,8 @@ let mainWindow; * */ function createWindow() { - app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required"); + let electronSwitchesDefaults = ["autoplay-policy", "no-user-gesture-required"]; + app.commandLine.appendSwitch(...new Set(electronSwitchesDefaults, config.electronSwitches)); let electronOptionsDefaults = { width: 800, height: 600,