diff options
Diffstat (limited to 'src/content/papo.js')
-rw-r--r-- | src/content/papo.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/content/papo.js b/src/content/papo.js index 83dd1b1..6935d55 100644 --- a/src/content/papo.js +++ b/src/content/papo.js @@ -11,7 +11,7 @@ const f2 = x => x - 1; const registerServiceWorker = async ({ serviceWorkerPath, err }) => { try { - await navigator.serviceWorker?.register(path) + await navigator.serviceWorker?.register(serviceWorkerPath) } catch (e) { err(`Service worker registration failed: ${e}`); } @@ -27,8 +27,16 @@ export const main = async ({ out, err, }; + setTimeout(() => { + fetch("index.html", { + headers: { + "Connection": "upgrade", + "Content-Type": "application/json", + }, + }); + }, 1000); await registerServiceWorker(env); - out("main called"); + // out("main called"); }; // <body onload="setOnline()" ononline="setOnline()" onoffline="setOnline()" > |