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:
parent
43a0e6ccea
commit
b2fa34662d
62 changed files with 275 additions and 144 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue