1const CACHE_NAME = "atlas-app-shell-v4"; 2const APP_SHELL = ["/", "/play", "/manifest.webmanifest", "/atlas-icon.svg", "/favicon.svg"]; 3 4self.addEventListener("install", (event) => { 5 event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)).then(() => self.skipWaiting())); 6}); 7 8self.addEventListener("activate", (event) => { 9 event.waitUntil( 10 caches.keys() 11 .then((keys) => Promise.all(keys.filter((key) => key !== CACHE_NAME).map((key) => caches.delete(key)))) 12 .then(() => self.clients.claim()), 13 ); 14}); 15 16self.addEventListener("fetch", (event) => { 17 if (event.request.method !== "GET") return; 18 if (event.request.mode === "navigate") { 19 event.respondWith(fetch(event.request).catch(() => caches.match("/") || caches.match("/play"))); 20 } 21});
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.