mirror of
https://github.com/medialab-prado/datamad2017.git
synced 2024-12-26 12:41:23 +01:00
Service worker initialisation is moved to default.
This commit is contained in:
parent
0a8fbff321
commit
7b3bba8d2b
2 changed files with 3 additions and 13 deletions
|
@ -51,17 +51,4 @@
|
|||
<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>
|
||||
|
|
|
@ -131,6 +131,9 @@ layout: compress
|
|||
{% endif %}
|
||||
</script>
|
||||
<script src="{{ "/js/scripts.min.js" | prepend: site.baseurl }}"></script>
|
||||
<script>
|
||||
navigator.serviceWorker.register('{{ site.baseurl }}/service-worker.js', {scope: '{{ site.baseurl }}/'});
|
||||
</script>
|
||||
{% if page.permalink == '/schedule/' %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
|
Loading…
Reference in a new issue