Created
September 19, 2022 00:21
-
-
Save mhluska/ac13f5ce37ff3951885474fedc3534ea to your computer and use it in GitHub Desktop.
Fix for Fastmail Masked Email + 1Password Firefox extension prefill
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
for (const elem of document.querySelectorAll('[type="email"],[placeholder*=email i],[aria-label*=email i]')) { | |
const prevName = elem.name; | |
const clone = elem.cloneNode(); | |
clone.name = 'email'; | |
elem.replaceWith(clone); | |
setTimeout(() => { clone.replaceWith(elem) }, 5000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment