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