Last active
June 2, 2018 08:20
-
-
Save inian/1c363e1e8cfcf6e7a19b7d9f43809100 to your computer and use it in GitHub Desktop.
Unregister Dexecure Service Worker registrations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
navigator.serviceWorker.getRegistrations().then(function(registrations) { | |
registrations.forEach(function(registration) { | |
if (registration.active && registration.active.scriptURL.includes("dexecure")) { | |
console.log('removing registration', registration); | |
registration.unregister(); | |
} | |
}) | |
}) | |
} catch (e) { | |
console.log('failed to unregister all service workers', e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment