Skip to content

Instantly share code, notes, and snippets.

@mhluska
Created September 19, 2022 00:21
Show Gist options
  • Save mhluska/ac13f5ce37ff3951885474fedc3534ea to your computer and use it in GitHub Desktop.
Save mhluska/ac13f5ce37ff3951885474fedc3534ea to your computer and use it in GitHub Desktop.
Fix for Fastmail Masked Email + 1Password Firefox extension prefill
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