mirror of
https://github.com/a2nt/silverstripe-progressivewebapp.git
synced 2024-10-22 11:05:45 +02:00
Merge branch 'master' of https://github.com/a2nt/silverstripe-progressivewebapp
This commit is contained in:
commit
2887b7be91
@ -15,7 +15,7 @@ composer require a2nt/silverstripe-progressivewebapp
|
|||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
var baseHref = (document.getElementsByTagName('base')[0] || {}).href;
|
var baseHref = (document.getElementsByTagName('base')[0] || {}).href;
|
||||||
if(baseHref){
|
if(baseHref){
|
||||||
navigator.serviceWorker.register(baseHref + 'service-worker.js').then(function() {
|
navigator.serviceWorker.register(baseHref + 'sw.js').then(function() {
|
||||||
console.log('Service Worker Registered');
|
console.log('Service Worker Registered');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user