PageSourceSearch

https://socialsell.ai/sw.js

js socialsell.ai collected 2026-10-05 15:08:38 UTC 1,100 bytes, 22 lines download raw bytes

1/* global self, caches, importScripts */
2// Worker único da origem: PWA e push compartilham registration/subscription.
3importScripts('/notification-sw.js');
4
5self.addEventListener('install', event => event.waitUntil(self.skipWaiting()));
6self.addEventListener('message', event => {
7  if (event.data?.type === 'SKIP_WAITING') event.waitUntil(self.skipWaiting());
8});
9self.addEventListener('activate', event => {
10  event.waitUntil((async () => {
11    // O PWA antigo guardava somente manifest, sem jamais servi-lo. Remover
12    // apenas seus caches; metadados de sessão/dedupe do push pertencem a outro ciclo.
13    const names = await caches.keys();
14    await Promise.all(names.filter(name => /^socialsell-v\d+$/.test(name)).map(name => caches.delete(name)));
15    await self.clients.claim();
16  })());
17});
18// Preserva o listener mínimo do PWA publicado, sem respondWith/cache de assets.
19// Em localhost não há handler de fetch. Atualizar não recarrega nenhuma aba.
20if (!['localhost', '127.0.0.1', '0.0.0.0', '[::1]'].includes(self.location.hostname)) {
21  self.addEventListener('fetch', () => {});
22}

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.