mirror of
https://github.com/medialab-prado/datamad2017.git
synced 2025-06-08 06:21:29 +02:00
service-worker
This commit is contained in:
parent
663186c708
commit
0a8fbff321
3 changed files with 21 additions and 3 deletions
|
@ -51,4 +51,17 @@
|
|||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('{{ site.baseurl }}/service-worker.js', {scope: '{{ site.baseurl }}/'})
|
||||
.then(function(r) {
|
||||
console.log('registered service worker');
|
||||
})
|
||||
.catch(function(whut) {
|
||||
console.error('uh oh... ');
|
||||
console.error(whut);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue