-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (33 loc) · 1.03 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>blog-manage</title>
</head>
<body>
<div id="app"> </div>
<!-- built files will be auto injected -->
</body>
<script async>
'use strict';
'serviceWorker' in navigator && navigator.serviceWorker.register('service-worker.js').then(function (a) {
a.onupdatefound = function () {
var b = a.installing;
b.onstatechange = function () {
switch (b.state) {
case 'installed':
navigator.serviceWorker.controller ? console.log('New or updated content is available.') : console.log(
'Content is now available offline!');
break;
case 'redundant':
console.error('The installing service worker became redundant.');
}
}
}
}).catch(function (a) {
console.error('Error during service worker registration:', a)
});
</script>
</html>