fix js attempt #1

This commit is contained in:
alistair3149 2016-12-09 05:42:28 -05:00 committed by GitHub
parent dba504a5d5
commit 7046985a09
2 changed files with 21 additions and 23 deletions

View file

@ -1,16 +1,14 @@
/* JavaScript for the Citizen skin */
(function () {
/* Register service worker */
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('../../sw.js').then(function (registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function (err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
/* Register service worker */
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('../../sw.js').then(function (registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function (err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
}
});
});
}

View file

@ -15,7 +15,7 @@
},
"AutoloadClasses": {
"SkinCitizen": "SkinCitizen.php",
"CitizenTemplate": "CitizenTemplate.php"
"CitizenTemplate": "CitizenTemplate.php"
},
"MessageDirs": {
"Citizen": "i18n"
@ -38,17 +38,17 @@
"resources/print.css": {
"media": "print"
}
},
"skins.citizen.js": {
"scripts": [
"resources/main.js"
],
"position": "top"
}
},
"ResourceFileModulePaths": {
"localBasePath": "",
"remoteSkinPath": "Citizen"
"skins.citizen.js": {
"scripts": [
"resources/main.js"
],
"position": "top"
}
},
"ResourceFileModulePaths": {
"localBasePath": "",
"remoteSkinPath": "Citizen"
}
}