mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-27 04:56:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			336 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			336 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| self.addEventListener("install", function () {
 | |
|   self.skipWaiting();
 | |
| });
 | |
| 
 | |
| self.addEventListener("activate", function () {
 | |
|   self.registration
 | |
|     .unregister()
 | |
|     .then(function () {
 | |
|       return self.clients.matchAll();
 | |
|     })
 | |
|     .then(function (clients) {
 | |
|       clients.forEach((client) => client.navigate(client.url));
 | |
|     });
 | |
| });
 |