mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-31 13:53:00 +00:00 
			
		
		
		
	Fix: don't use serviceworker for http:// uris -> fixes http stream in local player
This commit is contained in:
		
							
								
								
									
										19
									
								
								htdocs/sw.js
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								htdocs/sw.js
									
									
									
									
									
								
							| @@ -28,15 +28,16 @@ self.addEventListener('install', function(event) { | ||||
| }); | ||||
|  | ||||
| self.addEventListener('fetch', function(event) { | ||||
|   event.respondWith( | ||||
|     caches.match(event.request).then(function(response) { | ||||
|         if (response) | ||||
|             return response | ||||
|         else | ||||
|             return fetch(event.request); | ||||
|       } | ||||
|     ) | ||||
|   );     | ||||
|     if (event.request.url.match('^http://')) | ||||
|         return false; | ||||
|     event.respondWith( | ||||
|         caches.match(event.request).then(function(response) { | ||||
|             if (response) | ||||
|                 return response | ||||
|             else | ||||
|                 return fetch(event.request); | ||||
|         }) | ||||
|     );     | ||||
| }); | ||||
|  | ||||
| self.addEventListener('activate', function(event) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jcorporation
					jcorporation