mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			386 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			386 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache";
 | 
						|
 | 
						|
self.addEventListener("activate", function (event) {
 | 
						|
  console.log("ServiceWorker activated.");
 | 
						|
});
 | 
						|
 | 
						|
self.addEventListener("install", function (event) {
 | 
						|
  event.waitUntil(
 | 
						|
    caches.open(CHATGPT_NEXT_WEB_CACHE).then(function (cache) {
 | 
						|
      return cache.addAll([]);
 | 
						|
    }),
 | 
						|
  );
 | 
						|
});
 | 
						|
 | 
						|
self.addEventListener("fetch", (e) => {});
 |