diff options
Diffstat (limited to 'src/content/content.js')
-rw-r--r-- | src/content/content.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/content/content.js b/src/content/content.js index c7fc045..eb4fcdd 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -84,6 +84,16 @@ ns.on("capabilities", () => { }); if (!ns.canScript) { + + if (!!navigator.serviceWorker.controller) { + addEventListener("beforescriptexecute", e => e.preventDefault()); + (async () => { + for (let r of await navigator.serviceWorker.getRegistrations()) { + await r.unregister(); + } + })(); + } + if (document.readyState !== "loading") onScriptDisabled(); window.addEventListener("DOMContentLoaded", onScriptDisabled); } |