2023-03-27 09:41:44 +00:00
|
|
|
const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache";
|
|
|
|
|
2023-03-29 17:45:26 +00:00
|
|
|
self.addEventListener("activate", function (event) {
|
|
|
|
console.log("ServiceWorker activated.");
|
2023-03-27 09:41:44 +00:00
|
|
|
});
|
|
|
|
|
2023-03-29 17:45:26 +00:00
|
|
|
self.addEventListener("install", function (event) {
|
2023-03-27 09:41:44 +00:00
|
|
|
event.waitUntil(
|
2023-03-29 17:45:26 +00:00
|
|
|
caches.open(CHATGPT_NEXT_WEB_CACHE).then(function (cache) {
|
|
|
|
return cache.addAll([]);
|
|
|
|
}),
|
2023-03-27 09:41:44 +00:00
|
|
|
);
|
|
|
|
});
|
2023-04-02 12:28:18 +00:00
|
|
|
|
|
|
|
self.addEventListener("fetch", (e) => {});
|