PageSourceSearch

https://crypt.manus.space/service-worker.js

js crypt.manus.space collected 2026-10-03 05:01:05 UTC 1,340 bytes, 31 lines download raw bytes

1const CACHE_NAME = "cryptolens-v1";
2const CACHE_NAME = "cryptolens-shell-v2";
3const APP_SHELL = ["/", "/manifest.json", "/cryptolens-icon.svg"];
4
5self.addEventListener("install", event => {
6  event.waitUntil(caches.open(CACHE_NAME).then(cache => cache.addAll(APP_SHELL)).then(() => self.skipWaiting()));
7});
8
9self.addEventListener("activate", event => {
10  event.waitUntil(caches.keys().then(keys => Promise.all(keys.filter(key => key !== CACHE_NAME).map(key => caches.delete(key)))).then(() => self.clients.claim()));
11});
12
13self.addEventListener("fetch", event => {
14  const request = event.request;
15  const url = new URL(request.url);
16  if (request.method !== "GET" || url.origin !== self.location.origin) return;
17  if (url.pathname.startsWith("/api/")) {
18    event.respondWith(fetch(request).catch(() => caches.match(request)));
19    return;
20  }
21  if (request.mode === "navigate") {
22    event.respondWith(fetch(request).catch(() => caches.match("/")));
23    return;
24  }
25  if (APP_SHELL.includes(url.pathname)) {
26    event.respondWith(caches.match(request).then(cached => cached || fetch(request)));
27    return;
28  }
29  // حزم /assets المُمهّدة يجب أن تأتي من الشبكة دائماً حتى لا يطلب HTML جديد ملفاً قديماً.
30  event.respondWith(fetch(request).catch(() => caches.match(request)));
31});

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.