KaiOS webapp for InfoFer scraper
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
527 B

window.addEventListener('load', function (e) {
if (navigator.serviceWorker) {
navigator.serviceWorker.ready.then(function (reg) {
reg.active.postMessage({
type: 'swVersionRequest',
})
})
navigator.serviceWorker.addEventListener('message', function (e) {
if ('type' in e.data) {
switch (e.data.type) {
case 'swVersion': {
document.getElementById('sw-version-div').classList.remove('hidden')
document.getElementById('sw-version').textContent = e.data.version
}
}
}
})
}
})