-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserviceworker.js
31 lines (29 loc) · 1017 Bytes
/
serviceworker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const staticDevCoffee = "dequeCCA";
self.addEventListener('install', (e) => {
e.waitUntil(
caches.open('dequeCCA').then((cache) => cache.addAll([
'/Dequecca/',
'/Dequecca/index.html',
'/Dequecca/JS/contrast.js',
'/Dequecca/JS/deque-widgets.min.js',
'/Dequecca/JS/dqu2019.min.js',
'/Dequecca/JS/highlight.js',
'/Dequecca/JS/jquery.min.js',
'/Dequecca/JS/picker.js',
'/Dequecca/CSS/contrast.css',
'/Dequecca/CSS/deque-widgets.min.css',
'/Dequecca/CSS/dqu2019.min.css',
'/Dequecca/CSS/fontawesome-all.min.css',
'/Dequecca/CSS/railscasts.css',
'/Dequecca/CSS/ruleHelp.css',
'/Dequecca/images/eyedropper.png',
'/Dequecca/images/logo.png',
])),
);
});
self.addEventListener('fetch', (e) => {
console.log(e.request.url);
e.respondWith(
caches.match(e.request).then((response) => response || fetch(e.request)),
);
});