From 777aa2d54f6c75f56d9dd7a2aebaab4caf4b48ee Mon Sep 17 00:00:00 2001 From: Max1Truc Date: Sat, 29 Jul 2023 05:24:30 +0200 Subject: [PATCH] Plugin: fix annoying ServiceWorker popup Should fix #12 --- plugins/tiddlypwa/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/tiddlypwa/main.js b/plugins/tiddlypwa/main.js index 6b7169e..0b54873 100644 --- a/plugins/tiddlypwa/main.js +++ b/plugins/tiddlypwa/main.js @@ -286,6 +286,7 @@ Formatted with `deno fmt`. } catch (e) { console.error(e); if (!navigator.onLine) return; + if (location.protocol !== 'http:' && location.protocol !== 'https:') return; $tw.wiki.addTiddler({ title: '$:/status/TiddlyPWAWorkerError', text: e.message }); $tw.notifier.display('$:/plugins/valpackett/tiddlypwa/notif-sw-error'); }