blob: 1168c93043776fd825375a3096702ab6249be0ac (
plain)
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
|
/* global importScripts toolbox self */
// random string: CHfHo0GjMJAoOC
(global => {
'use strict'
// Load the sw-toolbox library.
importScripts('/components/sw-toolbox/sw-toolbox.js')
// Ensure that our service worker takes control of the page as soon as possible.
global.addEventListener('install', event => event.waitUntil(global.skipWaiting()))
global.addEventListener('activate', event => event.waitUntil(global.clients.claim()))
toolbox.precache([
'/',
'/hello',
'/untisinfo.css',
'/javascripts/bundle.js',
'/stylesheets/style.css',
'/stylesheets/hello.css'
])
toolbox.router.get('/', toolbox.cacheFirst)
toolbox.router.get('/hello', toolbox.cacheFirst)
toolbox.router.get('/javascripts/bundle.js', toolbox.cacheFirst)
toolbox.router.get('/stylesheets/*', toolbox.cacheFirst)
toolbox.router.get('/untisinfo.css', toolbox.cacheFirst)
toolbox.router.get('/meetingpointProxy/*', toolbox.networkFirst)
})(self)
|