From 449108f1e76dc4ba62c37955e61b17f1762a3a19 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 23 Aug 2025 04:27:54 +0000 Subject: [PATCH] This build was committed by a bot. --- docs/sw.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/sw.js b/docs/sw.js index 8254768..eaa3c81 100644 --- a/docs/sw.js +++ b/docs/sw.js @@ -1,5 +1,5 @@ const V = "1"; -const send = (a) => self.clients.matchAll({ type: "window", includeUncontrolled: true }).then((cs) => cs.forEach((c) => c.postMessage(a))); +const send = (m) => self.clients.matchAll({ type: "window", includeUncontrolled: true }).then((cs) => cs.forEach((c) => c.postMessage(m))); self.addEventListener("install", (e) => { self.skipWaiting(); }); @@ -9,11 +9,8 @@ self.addEventListener("activate", (e) => { await send({ type: "SW_ACTIVE", v: V, ts: Date.now() }); })()); }); -self.addEventListener("fetch", (e) => { - if (e.request.mode === "navigate") send({ type: "SW_NAVIGATE", url: e.request.url, ts: Date.now() }); -}); self.addEventListener("message", (e) => { if (e.data && e.data.type === "PING") { (e.source || null)?.postMessage({ type: "PONG", v: V, ts: Date.now() }) || send({ type: "PONG", v: V, ts: Date.now() }); - } else send({ type: "SW_MESSAGE", data: e.data, ts: Date.now() }); + } });