12 lines
379 B
JavaScript
12 lines
379 B
JavaScript
(function () {
|
|
if (!('serviceWorker' in navigator)) {
|
|
return;
|
|
}
|
|
|
|
window.addEventListener('load', function () {
|
|
navigator.serviceWorker.register('/sw.js?v=20260721_nocache1').then(function (registration) {
|
|
if (registration && typeof registration.update === 'function') registration.update();
|
|
}).catch(function () {});
|
|
});
|
|
})();
|