so://phie

outline

A web-based drawing app
git clone git://soophie.de/outline

blob: 19e8ae3d00ade998b4824749cdefa096753990fb (964 bytes)[doc][blame][raw]

1const FILES_TO_CACHE = [

2 './',

3 './index.html',

4 './manifest.json',

5 './asset/img/favicon.png',

6 './asset/img/app/icon-192x192.png',

7 './asset/lang/en.properties',

8 './asset/lang/de.properties',

9 './asset/font/material-icons.woff2',

10 './asset/font/roboto-thin.ttf',

11 './asset/font/roboto-light.ttf',

12 './asset/font/roboto-regular.ttf',

13 './asset/font/roboto-medium.ttf',

14 './asset/font/roboto-bold.ttf',

15 './asset/font/roboto-black.ttf',

16 './css/style.css',

17 './js/index.js',

18 './js/constant.js',

19 './js/util.js',

20 './js/addon/canvas.js',

21 './js/addon/locale.js',

22 './js/addon/ripple.js',

23 './js/addon/gamepad.js'

24];

25

26self.addEventListener('install', function(event) {

27 event.waitUntil(

28 caches.open('test').then((cache) => {

29 return cache.addAll(FILES_TO_CACHE);

30 })

31 );

32});

33

34self.addEventListener('fetch', function(event) {

35 event.respondWith(

36 caches.match(event.request).then(function(response) {

37 return response || fetch(event.request);

38 })

39 );

40});