From 8ceb34fe33d30dc8d87fdc0eb976aa538e905649 Mon Sep 17 00:00:00 2001 From: Val Packett Date: Sat, 24 Jun 2023 23:29:03 -0300 Subject: [PATCH] Plugin: minor cleanups --- plugins/tiddlypwa/config.tid | 2 ++ plugins/tiddlypwa/main.js | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/tiddlypwa/config.tid b/plugins/tiddlypwa/config.tid index 0839f59..ee16068 100644 --- a/plugins/tiddlypwa/config.tid +++ b/plugins/tiddlypwa/config.tid @@ -2,6 +2,8 @@ title: $:/plugins/valpackett/tiddlypwa/config tags: $:/tags/ControlPanel caption: Storage and Sync +\define tv-wikilinks() no + <$reveal type="match" state="$:/status/TiddlyPWADocsMode" text="yes"> TiddlyPWA is running in documentation/installer mode. diff --git a/plugins/tiddlypwa/main.js b/plugins/tiddlypwa/main.js index 01f0b83..c0a0f06 100644 --- a/plugins/tiddlypwa/main.js +++ b/plugins/tiddlypwa/main.js @@ -49,7 +49,6 @@ Formatted with `deno fmt`. } function b64dec(base64) { - // welp touching binary strings here but seems to be a decent compact way return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)); } @@ -247,7 +246,7 @@ Formatted with `deno fmt`. this.startedMonitor = true; if (this.monitorTimeout < 60000) this.monitorTimeout *= 2; clearTimeout(this.monitorTimer); - this.monitorTimer = setTimeout(async () => { + this.monitorTimer = setTimeout(() => { if (!navigator.locks) { this._startRealtimeMonitor(); } @@ -349,7 +348,9 @@ Formatted with `deno fmt`. setTimeout(() => { try { $tw.__update_tiddlypwa_manifest__(); - } catch (_e) {} + } catch (e) { + console.error(e); + } }, 300); return true; } @@ -455,7 +456,7 @@ Formatted with `deno fmt`. }, eventListeners: [{ name: 'click', - handlerFunction: (e) => giveUp.abort(), + handlerFunction: () => giveUp.abort(), }], })), 6900); timeoutModal = setTimeout(openModal, 1000); @@ -549,6 +550,7 @@ Formatted with `deno fmt`. showForm(); openModal(); } catch (e) { + console.error(e); clearTimeout(timeoutGiveUpBtn); body.innerHTML = '

Oops, looks like there is no information about the current server to be found!

'; body.innerHTML += '

Oh well, synchronization can be set up later in the settings.

';