PageSourceSearch

https://www.theeasyclick.com/worker.js

js theeasyclick.com collected 2026-09-28 02:08:51 UTC 1,083 bytes, 46 lines download raw bytes

1var CACHE_NAME = 'app-v2';
2
3// Install a service worker
4self.addEventListener('install', event => {
5  // Perform install steps
6  event.waitUntil(
7    caches.open(CACHE_NAME)
8      .then(function (cache) {
9        return cache.addAll([]);
10      })
11  );
12});
13
14// Cache and return requests
15// self.addEventListener('fetch', event => {
16//   event.respondWith(
17//     caches.match(event.request)
18//       .then(function(response) {
19//         // Cache hit - return response
20//         if (response) {
21//           return response;
22//         }
23//         return fetch(event.request);
24//       }
25//     )
26//   );
27// });
28self.addEventListener('fetch', event => {
29  event.respondWith(fetch(event.request));
30});
31
32// Update a service worker
33self.addEventListener('activate', event => {
34  var cacheWhitelist = ['app-v2'];
35  event.waitUntil(
36    caches.keys().then(cacheNames => {
37      return Promise.all(
38        cacheNames.map(cacheName => {
39          if (cacheWhitelist.indexOf(cacheName) === -1) {
40            return caches.delete(cacheName);
41          }
42        })
43      );
44    })
45  );
46});

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.