Skip to content

Commit

Permalink
Optionally omit login fields for an entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Vogt committed Jul 11, 2021
1 parent cb189f8 commit 47563bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/modules/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ PassFF.Page = (function () {
}
if (input_type != "") {
let pd = passwordData[input_type];
if (input_type != "otp" || pd) writeValueWithEvents(input, pd);
if (pd != "PASSFF_OMIT_FIELD" && (input_type != "otp" || pd)) {
writeValueWithEvents(input, pd);
}
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/pass.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ PassFF.Pass = (function () {
let login;
for (let i = 0; i < PassFF.Preferences.loginFieldNames.length; i++) {
login = passwordData[PassFF.Preferences.loginFieldNames[i]];
if (login) break;
if (login !== undefined) break;
}
passwordData.login = (!login) ? item.key : login;
passwordData.login = (login === undefined) ? item.key : login;
}

function setUrl(passwordData) {
Expand Down

0 comments on commit 47563bb

Please sign in to comment.