mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-07 23:29:46 +08:00
feat: close #2 add check account balance
This commit is contained in:
@@ -1,24 +1,13 @@
|
||||
const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache";
|
||||
|
||||
self.addEventListener('activate', function (event) {
|
||||
console.log('ServiceWorker activated.');
|
||||
self.addEventListener("activate", function (event) {
|
||||
console.log("ServiceWorker activated.");
|
||||
});
|
||||
|
||||
self.addEventListener('install', function (event) {
|
||||
self.addEventListener("install", function (event) {
|
||||
event.waitUntil(
|
||||
caches.open(CHATGPT_NEXT_WEB_CACHE)
|
||||
.then(function (cache) {
|
||||
return cache.addAll([
|
||||
]);
|
||||
})
|
||||
caches.open(CHATGPT_NEXT_WEB_CACHE).then(function (cache) {
|
||||
return cache.addAll([]);
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', function (event) {
|
||||
event.respondWith(
|
||||
caches.match(event.request)
|
||||
.then(function (response) {
|
||||
return response || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user