summaryrefslogtreecommitdiff
path: root/src/content/content.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/content.js')
-rw-r--r--src/content/content.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/content/content.js b/src/content/content.js
index fb68ae4..302ee8a 100644
--- a/src/content/content.js
+++ b/src/content/content.js
@@ -83,19 +83,7 @@ ns.on("capabilities", () => {
});
if (!ns.canScript) {
- addEventListener("beforescriptexecute", e => e.preventDefault());
- let mo = new MutationObserver(mutations => {
- for (let m of mutations) {
- console.log(`Mutation `, m);
- if (m.type !== "attribute") continue;
- if (/^on\w+/i.test(m.attributeName)) {
- m.target.removeAttribute(m.attributeName);
- } else if (/^\s*(javascript|data):/i.test(m.target.attributes[m.attributeName])) {
- m.target.setAttribute(m.attributeName, "#");
- }
- }
- });
- // mo.observe(document.documentElement, {attributes: true, subtree: true});
+
if ("serviceWorker" in navigator && navigator.serviceWorker.controller) {
(async () => {
for (let r of await navigator.serviceWorker.getRegistrations()) {