2019-02-18 09:23:20 +01:00
|
|
|
self.addEventListener('install', event => {
|
|
|
|
event.waitUntil(
|
|
|
|
caches
|
|
|
|
.open('homer')
|
|
|
|
.then(cache =>
|
|
|
|
cache.addAll([
|
2019-12-19 15:45:51 +01:00
|
|
|
'.',
|
|
|
|
'index.html',
|
|
|
|
'app.css',
|
|
|
|
'app.js',
|
2020-01-13 06:45:37 +01:00
|
|
|
'vendors/vue.min.js',
|
2019-12-19 15:45:51 +01:00
|
|
|
'vendors/js-yaml.min.js',
|
2020-01-13 06:45:37 +01:00
|
|
|
'vendors/font-awesone.min.css',
|
|
|
|
'vendors/bulma.min.css',
|
2019-12-19 15:45:51 +01:00
|
|
|
'assets/logo.png',
|
2020-01-14 16:13:17 +01:00
|
|
|
'assets/favicon.png',
|
2020-01-13 06:45:37 +01:00
|
|
|
'webfonts/raleway/raleway-v14-latin-regular.woff',
|
|
|
|
'webfonts/raleway/raleway-v14-latin-regular.woff2',
|
|
|
|
'webfonts/lato/lato-v16-latin-regular.woff',
|
|
|
|
'webfonts/lato/lato-v16-latin-regular.woff2',
|
2020-01-13 22:42:57 +01:00
|
|
|
'webfonts/fa-brands-400.woff',
|
|
|
|
'webfonts/fa-brands-400.woff2',
|
|
|
|
'webfonts/fa-brands-400.svg',
|
|
|
|
'webfonts/fa-brands-400.ttf',
|
|
|
|
'webfonts/fa-brands-400.eot',
|
|
|
|
'webfonts/fa-regular-400.woff',
|
|
|
|
'webfonts/fa-regular-400.woff2',
|
|
|
|
'webfonts/fa-regular-400.svg',
|
|
|
|
'webfonts/fa-regular-400.ttf',
|
|
|
|
'webfonts/fa-regular-400.eot',
|
|
|
|
'webfonts/fa-solid-900.woff',
|
|
|
|
'webfonts/fa-solid-900.woff2',
|
|
|
|
'webfonts/fa-solid-900.svg',
|
|
|
|
'webfonts/fa-solid-900.ttf',
|
|
|
|
'webfonts/fa-solid-900.eot',
|
2019-02-18 09:23:20 +01:00
|
|
|
])
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})
|
|
|
|
|
|
|
|
self.addEventListener('fetch', event => {
|
|
|
|
event.respondWith(
|
|
|
|
caches.match(event.request).then(response => {
|
|
|
|
if (response) {
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
return fetch(event.request);
|
|
|
|
})
|
|
|
|
);
|
|
|
|
});
|