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>2020-10-16 23:49:50 +0300
committerPhie <phie@phie.ovh>2020-10-16 23:49:50 +0300
commitb25f051c1c39b0501d27259cf4aea5ce0b2dedd5 (patch)
tree184a414d464ece801be8e5cdcbc5c8ed8e20cc83
parent41cf5bb4f635952c0ba916d24352f2f24d7b6ac2 (diff)
preload editor
-rw-r--r--browsers/browser.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/browsers/browser.js b/browsers/browser.js
index 0e7cfd7..3780a8f 100644
--- a/browsers/browser.js
+++ b/browsers/browser.js
@@ -85,12 +85,16 @@ function openNote(notePath, action) {
window.open("writer?path=" + encodeURIComponent(notePath) + (action != undefined ? "&action=" + action : ""), "_blank");
}
else {
- $("#editor-container").show()
- $(loadingView).fadeIn(function () {
- writerFrame.src = data + "?path=" + encodeURIComponent(notePath) + (action != undefined ? "&action=" + action : "");
- writerFrame.style.display = "inline-flex"
+ writerFrame.src = data + "?path=" + encodeURIComponent(notePath) + (action != undefined ? "&action=" + action : "");
+ if (notePath !== undefined) {
+ $("#editor-container").show()
+ console.log("notePath " + notePath)
+ $(loadingView).fadeIn(function () {
- })
+ writerFrame.style.display = "inline-flex"
+
+ })
+ }
}
/*setTimeout(function () {
writerFrame.openDevTools()
@@ -472,6 +476,10 @@ function onListEnd(pathToList, files, metadatas, discret, force, fromCache) {
console.log("scroll : " + scroll)
}
+ if (!fromCache && isFirstLoad) {
+ openNote(undefined, undefined)
+ isFirstLoad = false
+ }
}
}