web/assets/js/pwa/unregister.js
2022-10-25 19:26:44 +08:00

12 lines
254 B
JavaScript

---
layout: compress
permalink: '/unregister.js'
---
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (let reg of registrations) {
reg.unregister();
}
});
}