Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1self.addEventListener("install", () => {
2 self.skipWaiting();
3});
4
5self.addEventListener("activate", async () => {
6 // Unregister the service worker
7 await self.registration.unregister();
8
9 // Delete all caches
10 const keys = await caches.keys();
11 await Promise.all(keys.map((key) => caches.delete(key)));
12
13 // Reload all clients
14 const clientsList = await clients.matchAll({ type: "window" });
15 for (const client of clientsList) {
16 client.navigate(client.url);
17 }
18});