Add option to ignore entries matching a pattern (#161)

* Add option to ignore entries matching a pattern
This commit is contained in:
Erayd
2019-08-31 23:14:14 +12:00
committed by GitHub
parent 5e31b0d4d5
commit 3d36b3488f
5 changed files with 44 additions and 3 deletions

View File

@@ -121,7 +121,8 @@ async function updateMatchingPasswordsCount(tabId) {
throw new Error(`Unable to determine domain of the tab with id ${tabId}`);
}
const logins = helpers.prepareLogins(response.data.files, settings);
const files = helpers.ignoreFiles(response.data.files, settings);
const logins = helpers.prepareLogins(files, settings);
const matchedPasswordsCount = logins.reduce(
(acc, login) => acc + (login.recent.count || login.inCurrentDomain ? 1 : 0),
0
@@ -714,7 +715,8 @@ async function handleMessage(settings, message, sendResponse) {
if (response.status != "ok") {
throw new Error(JSON.stringify(response)); // TODO handle host error
}
sendResponse({ status: "ok", files: response.data.files });
let files = helpers.ignoreFiles(response.data.files, settings);
sendResponse({ status: "ok", files });
} catch (e) {
sendResponse({
status: "error",