get forms anyway even if no matches
This commit is contained in:
parent
caea4f90fd
commit
8f380ed30b
@ -3,6 +3,7 @@
|
||||
let currentForm = null;
|
||||
let successfulAttachment = false;
|
||||
let focusedField = null;
|
||||
let loginForms = [];
|
||||
|
||||
function generateQuerySelector(el) {
|
||||
if (el.tagName.toLowerCase() === 'html') {
|
||||
@ -184,10 +185,9 @@
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
const forms = lookForLoginForms();
|
||||
if (forms.length) {
|
||||
forms.forEach((form) => attachLoginFormHighlight(form));
|
||||
function createFormHighlights() {
|
||||
if (loginForms.length) {
|
||||
loginForms.forEach((form) => attachLoginFormHighlight(form));
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
) {
|
||||
if (request.message === 'has_entries') {
|
||||
currentPageMatches = request.payload;
|
||||
init();
|
||||
createFormHighlights();
|
||||
sendResponse(true);
|
||||
}
|
||||
|
||||
@ -244,7 +244,9 @@
|
||||
}
|
||||
|
||||
if (e.target && e.target.tagName === 'INPUT') {
|
||||
init();
|
||||
createFormHighlights();
|
||||
}
|
||||
});
|
||||
|
||||
loginForms = lookForLoginForms();
|
||||
})();
|
||||
|
@ -36,7 +36,8 @@ async function findSiteInPasswords(siteDomain) {
|
||||
.filter((item) => {
|
||||
const name = item.toLowerCase();
|
||||
return name.includes(siteDomain) || (sdwTLD && name.includes(sdwTLD));
|
||||
});
|
||||
})
|
||||
.slice(0, 4);
|
||||
}
|
||||
|
||||
async function getPassword(password) {
|
||||
|
Loading…
Reference in New Issue
Block a user