mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 06:24:22 +00:00
fix js attempt #1
This commit is contained in:
parent
dba504a5d5
commit
7046985a09
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
20
skin.json
20
skin.json
|
@ -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"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue