From 7a1c5ac83195604eabb34131629a3cf9710a1e39 Mon Sep 17 00:00:00 2001 From: PalmerAL Date: Fri, 5 Jan 2024 14:59:08 -0600 Subject: [PATCH] Update passwordFill.js --- js/preload/passwordFill.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/js/preload/passwordFill.js b/js/preload/passwordFill.js index a8a0eb17d..176b09a15 100644 --- a/js/preload/passwordFill.js +++ b/js/preload/passwordFill.js @@ -24,7 +24,18 @@ wanted to keep it lightweight and not impact browser performace too much. */ // "carbon:password" -const keyIcon = '' + +const getKeyIcon = () => { + const keyIcon = '' + + const keyIconPolicy = trustedTypes.createPolicy('minAutofillTrustedKeyIcon', { + createHTML: (string) => string + }) + + return keyIconPolicy.createHTML(keyIcon) +} + +const keyIcon = getKeyIcon() // Ref to added unlock button. var currentUnlockButton = null @@ -120,7 +131,7 @@ function getBestInput (names, exclusionNames, types) { // Shortcut to get username fields from a page. function getBestUsernameField () { - return getBestInput(['user', 'name', 'mail', 'login', 'auth', 'identifier'], ['confirm', 'filename'], ['text', 'email']) + return getBestInput(['user', 'name', 'mail', 'login', 'auth', 'identifier', 'account', 'acct'], ['confirm', 'filename'], ['text', 'email']) } // Shortcut to get password fields from a page.