From 59e82fee5e7d45af05963536859c45f2a397cb60 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 25 Apr 2019 10:46:52 -0400 Subject: [PATCH] only use username if greater than 1 character long --- src/content/notificationBar.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/notificationBar.ts b/src/content/notificationBar.ts index 2701f597ce..5f7bfbeae7 100644 --- a/src/content/notificationBar.ts +++ b/src/content/notificationBar.ts @@ -261,6 +261,9 @@ document.addEventListener('DOMContentLoaded', (event) => { function locateFields(formDataObj: any) { const inputs = Array.from(document.getElementsByTagName('input')); formDataObj.usernameEl = locateField(formDataObj.formEl, formDataObj.data.username, inputs); + if (formDataObj.usernameEl != null && formDataObj.usernameEl.value.length < 2) { + formDataObj.usernameEl = null; + } if (formDataObj.usernameEl != null && formDataObj.data.password != null) { formDataObj.passwordEl = locatePassword(formDataObj.formEl, formDataObj.data.password, inputs, true); } else if (formDataObj.data.passwords != null) {