A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

More service worker tweaks

+6 -3
+6 -3
src/Javascript/Workers/service.js
··· 36 36 .then(response => response.json()) 37 37 .then(tree => { 38 38 const filteredTree = tree.filter(t => !exclude.find(u => u === t)) 39 - const whatToCache = [ href, `${href}about`, "/", "/about" ].concat(filteredTree) 39 + const whatToCache = [ href, `${href.replace(/\/+$/, "")}/about/` ].concat(filteredTree) 40 40 return caches.open(KEY).then(c => Promise.all(whatToCache.map(x => c.add(x)))) 41 41 }) 42 42 .then(_ => self.skipWaiting()) ··· 93 93 caches 94 94 .open(KEY) 95 95 .then(cache => cache.match(url)) 96 - .then(match => match || Promise.reject("no-match")) 96 + .then(match => match || fetch(url)) 97 97 ) 98 98 99 99 if (!isOffline && event.request.mode !== "navigate") event.waitUntil( ··· 102 102 .then(cache => fetch(url) 103 103 .then(response => response.clone()) 104 104 .then(response => cache.put(url, response)) 105 - ) 105 + ).catch(err => { 106 + console.error("Could not fetch " + url.href) 107 + console.error(err) 108 + }) 106 109 ) 107 110 } 108 111 })