-
Notifications
You must be signed in to change notification settings - Fork 7
/
serviceworker.js
149 lines (145 loc) · 4.92 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
var cacheName = 'coba';
var assets = [
// '/about.html',
// '/blog-cuci-tangan.html',
// '/blog-karantina.html',
// '/index.html',
// '/blog-semarangcerdas.html',
// '/blog-workforhome.html',
// '/blog.html',
// '/contact.html',
// '/donate.html',
// '/main.html',
// './js/ambildata.js',
// './js/aos.js',
// './js/bootstrap-datepicker.js',
// './js/bootstrap.min.js',
// './js/google-map.js',
// './js/jquery-3.2.1.min.js',
// './js/jquery-migrate-3.0.1.min.js',
// './js/jquery.animateNumber.min.js',
// './js/jquery.easing.1.3.js',
// './js/jquery.magnific-popup.min.js',
// './js/jquery.min.js',
// './js/jquery.stellar.min.js',
// './js/jquery.timepicker.min.js',
// './js/jquery.waypoints.min.js',
// './js/main.js',
// './js/owl.carousel.min.js',
// './js/popper.min.js',
// './images/1.jpg',
// './images/2.jpeg',
// './images/PencegahanVirusmasyarakat.JPG',
// './images/Untitled-1.jpg',
// './images/arham.jpg',
// './images/bg_1.jpg',
// './images/bg_2.jpg',
// './images/bg_3.jpg',
// './images/coronaedu.mp4',
// './images/cucitangan.JPG',
// './images/dirumah.jpg',
// './images/donasi.png',
// './images/edi.jpg',
// './images/etikabatuk.JPG',
// './images/g1.jpg',
// './images/g10.jpeg',
// './images/g11.jpg',
// './images/g12.jpg',
// './images/g2.jpg',
// './images/g3.jpg',
// './images/g4.jpeg',
// './images/g5.jpg',
// './images/g6.jpg',
// './images/g7.jpg',
// './images/g8.jpeg',
// './images/g9.jpg',
// './images/galery_bg.jpeg',
// './images/gejalacovid.JPG',
// './images/gereja.JPG',
// './images/germas.JPG',
// './images/head.png',
// './images/icon',
// './images/icon.png',
// './images/img_1.jpg',
// './images/img_2.jpg',
// './images/img_3.1.jpg',
// './images/img_3.jpg',
// './images/img_3.png',
// './images/img_4.jpg',
// './images/img_5.jpg',
// './images/img_6.jpg',
// './images/img_7.png',
// './images/kusni.jpg',
// './images/logo apps.png',
// './images/masjid.jpg',
// './images/masker.JPG',
// './images/nelayan.JPG',
// './images/ojek.jpg',
// './images/pencegahanuntukkesehatan.JPG',
// './images/penyemprotan.jpg',
// './images/person_1.jpg',
// './images/person_2.jpg',
// './images/person_3.jpg',
// './images/person_4.jpg',
// './images/petani.JPG',
// './images/pulung.jpg',
// './images/rindra.jpg',
// './images/transmigran.JPG',
// './images/udinus.png',
// './images/udinuscover.png',
// './images/work.jpg',
// './images/icon/android-icon-192x192-dunplab-manifest-107.png',
// './images/icon/apple-icon-114x114-dunplab-manifest-107.png',
// './images/icon/apple-icon-120x120-dunplab-manifest-107.png',
// './images/icon/apple-icon-144x144-dunplab-manifest-107.png',
// './images/icon/apple-icon-152x152-dunplab-manifest-107.png',
// './images/icon/apple-icon-180x180-dunplab-manifest-107.png',
// './images/icon/apple-icon-57x57-dunplab-manifest-107.png',
// './images/icon/apple-icon-60x60-dunplab-manifest-107.png',
// './images/icon/apple-icon-72x72-dunplab-manifest-107.png',
// './images/icon/apple-icon-76x76-dunplab-manifest-107.png',
// './images/icon/favicon-16x16-dunplab-manifest-107.png',
// './images/icon/favicon-32x32-dunplab-manifest-107.png',
// './images/icon/favicon-96x96-dunplab-manifest-107.png',
// './images/icon/logo512x.png',
// './css/ajax-loader.gif',
// './css/animate.css',
// './css/aos.css',
// './css/bootstrap-datepicker.css',
// './css/bootstrap.css',
// './css/fancybox.min.css',
// './css/flaticon.css',
// './css/icomoon.css',
// './css/ionicons.min.css',
// './css/jquery.timepicker.css',
// './css/magnific-popup.css',
// './css/open-iconic-bootstrap.min.css',
// './css/owl.carousel.css',
// './css/owl.carousel.min.css',
// './css/owl.theme.default.css',
// './css/owl.theme.default.min.css',
// './css/owl.theme.green.css',
// './css/owl.theme.green.min.css',
// './css/owl.video.play.png',
// './css/style.css',
// 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js',
// 'https://code.iconify.design/1/1.0.5/iconify.min.js',
// 'https://fonts.googleapis.com/css?family=Overpass:300,400,500|Dosis:400,700',
];
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open(cacheName).then(function(cache) {
console.log('Caching Assets');
return cache.addAll(assets);
})
)
});
self.addEventListener('activate', function(event) {
});
self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request).then(function(cacheRes) {
return cacheRes || fetch(event.request);
})
);
});