From ccdd0940f08ff3dddaf14f2d08083088a585246e Mon Sep 17 00:00:00 2001 From: tiddlygit-test Date: Sat, 29 Aug 2020 19:28:28 +0800 Subject: [PATCH] fix: enable remote --- public/windows/about.js | 1 + public/windows/add-workspace.js | 1 + public/windows/auth.js | 1 + public/windows/code-injection.js | 1 + public/windows/custom-user-agent.js | 1 + public/windows/display-media.js | 1 + public/windows/edit-workspace.js | 1 + public/windows/go-to-url.js | 1 + public/windows/main.js | 2 ++ public/windows/notifications.js | 1 + public/windows/open-url-with.js | 1 + public/windows/preferences.js | 1 + public/windows/proxy.js | 1 + public/windows/spellcheck-languages.js | 1 + 14 files changed, 15 insertions(+) diff --git a/public/windows/about.js b/public/windows/about.js index 4c2e20bb..244f9d94 100644 --- a/public/windows/about.js +++ b/public/windows/about.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'about.js'), diff --git a/public/windows/add-workspace.js b/public/windows/add-workspace.js index 17a595c9..52404b60 100644 --- a/public/windows/add-workspace.js +++ b/public/windows/add-workspace.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, enableRemoteModule: true, diff --git a/public/windows/auth.js b/public/windows/auth.js index fe3dad1d..0ff4fb8f 100644 --- a/public/windows/auth.js +++ b/public/windows/auth.js @@ -26,6 +26,7 @@ const create = (id) => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'auth.js'), diff --git a/public/windows/code-injection.js b/public/windows/code-injection.js index b37ba097..85a9b064 100644 --- a/public/windows/code-injection.js +++ b/public/windows/code-injection.js @@ -28,6 +28,7 @@ const create = (type) => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'code-injection.js'), diff --git a/public/windows/custom-user-agent.js b/public/windows/custom-user-agent.js index 8c84e0bc..04fb936c 100644 --- a/public/windows/custom-user-agent.js +++ b/public/windows/custom-user-agent.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'custom-user-agent.js'), diff --git a/public/windows/display-media.js b/public/windows/display-media.js index ddd86e58..e1cb0484 100644 --- a/public/windows/display-media.js +++ b/public/windows/display-media.js @@ -25,6 +25,7 @@ const create = (viewId) => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'display-media.js'), diff --git a/public/windows/edit-workspace.js b/public/windows/edit-workspace.js index c820c208..b172f014 100644 --- a/public/windows/edit-workspace.js +++ b/public/windows/edit-workspace.js @@ -25,6 +25,7 @@ const create = (id) => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'edit-workspace.js'), diff --git a/public/windows/go-to-url.js b/public/windows/go-to-url.js index e2500778..bd936534 100644 --- a/public/windows/go-to-url.js +++ b/public/windows/go-to-url.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'go-to-url.js'), diff --git a/public/windows/main.js b/public/windows/main.js index 93980f3d..aab09430 100644 --- a/public/windows/main.js +++ b/public/windows/main.js @@ -55,6 +55,7 @@ const createAsync = () => new Promise((resolve) => { minWidth: 250, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, webSecurity: false, @@ -167,6 +168,7 @@ const createAsync = () => new Promise((resolve) => { icon: process.platform === 'linux' && process.env.SNAP == null ? path.resolve(__dirname, '..', 'icon.png') : undefined, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'main.js'), diff --git a/public/windows/notifications.js b/public/windows/notifications.js index 578f74f0..fc864042 100644 --- a/public/windows/notifications.js +++ b/public/windows/notifications.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'notifications.js'), diff --git a/public/windows/open-url-with.js b/public/windows/open-url-with.js index 50c43c57..8a8e030c 100644 --- a/public/windows/open-url-with.js +++ b/public/windows/open-url-with.js @@ -25,6 +25,7 @@ const create = (url) => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'open-url-with.js'), diff --git a/public/windows/preferences.js b/public/windows/preferences.js index 1ebbaf82..73187f6a 100644 --- a/public/windows/preferences.js +++ b/public/windows/preferences.js @@ -25,6 +25,7 @@ const create = (scrollTo) => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'preferences.js'), diff --git a/public/windows/proxy.js b/public/windows/proxy.js index 740edf38..09c76722 100644 --- a/public/windows/proxy.js +++ b/public/windows/proxy.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'proxy.js'), diff --git a/public/windows/spellcheck-languages.js b/public/windows/spellcheck-languages.js index e1124880..2756136c 100644 --- a/public/windows/spellcheck-languages.js +++ b/public/windows/spellcheck-languages.js @@ -23,6 +23,7 @@ const create = () => { autoHideMenuBar: false, webPreferences: { nodeIntegration: false, + enableRemoteModule: true, webSecurity: !isDev, contextIsolation: true, preload: path.join(__dirname, '..', 'preload', 'spellcheck-languages.js'),