Implement autoSubmit, reading settings from pass file and .browserpass.json (#43)

This commit is contained in:
Maxim Baz
2019-03-16 03:45:41 +01:00
committed by GitHub
parent 1676b90187
commit 423a9bbb43
2 changed files with 60 additions and 7 deletions

View File

@@ -78,7 +78,6 @@
* @return object result of filling a form
*/
function fillLogin(request) {
var autoSubmit = false;
var result = {
filledFields: [],
foreignFill: undefined
@@ -139,14 +138,14 @@
// Try to submit the form, or focus on the submit button (based on user settings)
if (submit) {
if (autoSubmit) {
if (request.autoSubmit) {
submit.click();
} else {
submit.focus();
}
} else {
// There is no submit button. Try to submit the form itself.
if (autoSubmit && loginForm) {
if (request.autoSubmit && loginForm) {
loginForm.submit();
}
// We need to keep focus somewhere within the form, so that Enter hopefully submits the form.