1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update sync menus

This commit is contained in:
Luke Pulverenti 2016-08-12 11:54:37 -04:00
parent 43a0e6ccea
commit b2fa34662d
62 changed files with 275 additions and 144 deletions

View file

@ -50,23 +50,25 @@ function isCacheable(request) {
return true;
}
//self.addEventListener('fetch', function (event) {
if (self.location.toString().indexOf('localhost') == -1) {
self.addEventListener('fetch', function (event) {
// if (!isCacheable(event.request)) {
// return;
// }
if (!isCacheable(event.request)) {
return;
}
// event.respondWith(
// caches.open(staticFileCacheName).then(function (cache) {
// return cache.match(event.request).then(function (response) {
// return response || fetch(event.request).then(function (response) {
// cache.put(event.request, response.clone());
// return response;
// });
// });
// })
// );
//});
event.respondWith(
caches.open(staticFileCacheName).then(function (cache) {
return cache.match(event.request).then(function (response) {
return response || fetch(event.request).then(function (response) {
cache.put(event.request, response.clone());
return response;
});
});
})
);
});
}
self.addEventListener('activate', function (event) {