1self.addEventListener("push", (event) => { 2 let payload = {}; 3 try { payload = event.data?.json() ?? {}; } catch { payload = {}; } 4 event.waitUntil(self.registration.showNotification(payload.title || "ער××¥ 25 ××צ×", { 5 body: payload.body || "×ת××× ×ת ×××× ×ת×××× ×¢×× 3 ××§×ת!", 6 tag: payload.tag || "show-reminder", 7 data: payload.data || { url: "/" }, 8 dir: "rtl", 9 lang: "he", 10 })); 11}); 12 13self.addEventListener("notificationclick", (event) => { 14 event.notification.close(); 15 const targetUrl = new URL(event.notification.data?.url || "/", self.location.origin).href; 16 event.waitUntil(self.clients.matchAll({ type: "window", includeUncontrolled: true }).then(async (clients) => { 17 const existing = clients.find((client) => client.url.startsWith(self.location.origin)); 18 if (existing) { 19 await existing.focus(); 20 if ("navigate" in existing) await existing.navigate(targetUrl); 21 return; 22 } 23 await self.clients.openWindow(targetUrl); 24 })); 25});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.