diff options
author | Phie <phie@phie.ovh> | 2021-05-08 23:41:46 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2021-05-08 23:41:46 +0300 |
commit | 4ae3766ff6c77f48afdcb2e07070de4e4fb76693 (patch) | |
tree | 96a360127fe79253f61e6b7908d1aeddefdc74f2 | |
parent | 271ca02846848866c643d27540bc7d6323d3c7dd (diff) |
fix eletron 12link-to-note
-rw-r--r-- | compatibility/compatibility.js | 4 | ||||
-rw-r--r-- | index.html | 2 | ||||
-rw-r--r-- | main.js | 3 | ||||
-rw-r--r-- | server/server.js | 2 | ||||
-rw-r--r-- | settings.html | 2 |
5 files changed, 8 insertions, 5 deletions
diff --git a/compatibility/compatibility.js b/compatibility/compatibility.js index 8315a6b..d5f0088 100644 --- a/compatibility/compatibility.js +++ b/compatibility/compatibility.js @@ -77,7 +77,9 @@ class Compatibility { frame: true, webPreferences: { nodeIntegration: true, - webviewTag: true + webviewTag: true, + enableRemoteModule: true, + contextIsolation: false, } }); const url = require('url') @@ -247,7 +247,7 @@ </div> <div id="editor-container"> - <webview class="editor" id="writer-webview" nodeintegration> </webview> + <webview class="editor" id="writer-webview" nodeintegration webpreferences="contextIsolation=false"> </webview> <iframe class="editor" id="writer-iframe" allowfullscreen></iframe> <div id="loading-view"> <button class="mdl-button mdl-js-button" id="cancel-load-button" data-i18n="cancel">Cancel</button> @@ -75,7 +75,8 @@ function createWindow() { webPreferences: { nodeIntegration: true, webviewTag: true, - enableRemoteModule: true + enableRemoteModule: true, + contextIsolation: false, } }) diff --git a/server/server.js b/server/server.js index 65e247f..4db3e16 100644 --- a/server/server.js +++ b/server/server.js @@ -845,7 +845,7 @@ class CarnetHttpServer { if (request.method == 'GET') { var media = current_url.searchParams.get('media'); var note = current_url.searchParams.get('note'); - if (note.endsWith(".sqd") && note.indexOf("../") == -1) { + if (note!= undefined &¬e.endsWith(".sqd") && note.indexOf("../") == -1) { console.log("get " + media) console.log("from note " + note) diff --git a/settings.html b/settings.html index 2e24114..ad895c9 100644 --- a/settings.html +++ b/settings.html @@ -259,7 +259,7 @@ restart</div> </div> <div id="frame-container"> - <webview class="frame" id="webview" nodeintegration> </webview> + <webview class="frame" id="webview" nodeintegration webpreferences="contextIsolation=false"> </webview> <iframe class="frame" id="iframe" allowfullscreen></iframe> </div> <script src="settings/settings.js"></script> |