Plugin: fix annoying ServiceWorker popup

Should fix #12
This commit is contained in:
Max1Truc 2023-07-29 05:24:30 +02:00
parent 2b24d09952
commit 777aa2d54f

View file

@ -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');
}