From f0ae0937eedafafe33fdcf7bd29c1f7a229bad2a Mon Sep 17 00:00:00 2001 From: Angelos Bouklis <53124886+ArjixWasTaken@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:24:07 +0300 Subject: [PATCH] Update content.js Oops, forgot to iterate over the child nodes. --- content.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content.js b/content.js index 8b27236..be6fa66 100644 --- a/content.js +++ b/content.js @@ -2,8 +2,10 @@ const tagName = "input"; new MutationObserver(async (mutations, observer) => { for (const mutation of mutations) { if (mutation.type !== "childList") continue; - if (mutation.target.tagName !== tagName.toUpperCase()) continue; + for (const child of mutation.addedNodes) { + if (child.tagName !== tagName.toUpperCase()) continue; - mutation.target.setAttribute("autocomplete", "off"); + child.setAttribute("autocomplete", "off"); + } } }).observe(document, { subtree: true, childList: true });