Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/PhieF/CarnetElectron.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2021-05-08 23:41:46 +0300
committerPhie <phie@phie.ovh>2021-05-08 23:41:46 +0300
commit4ae3766ff6c77f48afdcb2e07070de4e4fb76693 (patch)
tree96a360127fe79253f61e6b7908d1aeddefdc74f2
parent271ca02846848866c643d27540bc7d6323d3c7dd (diff)
fix eletron 12link-to-note
-rw-r--r--compatibility/compatibility.js4
-rw-r--r--index.html2
-rw-r--r--main.js3
-rw-r--r--server/server.js2
-rw-r--r--settings.html2
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')
diff --git a/index.html b/index.html
index 16d24c5..52c19c3 100644
--- a/index.html
+++ b/index.html
@@ -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>
diff --git a/main.js b/main.js
index b7f9a18..29f1405 100644
--- a/main.js
+++ b/main.js
@@ -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 &&note.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>