From d73f8e55aeaea6f2a56ce40f3cd80d44f58acdd5 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Wed, 12 Aug 2020 18:51:53 +0200 Subject: [PATCH] inject: prefer full match first before making a substring searching --- src/inject.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/inject.js b/src/inject.js index 21748fa..b206ecd 100644 --- a/src/inject.js +++ b/src/inject.js @@ -7,6 +7,23 @@ const USERNAME_FIELDS = { selectors: [ "input[autocomplete=username i]", + + "input[name=login i]", + "input[name=user i]", + "input[name=username i]", + "input[name=email i]", + "input[name=alias i]", + "input[id=login i]", + "input[id=user i]", + "input[id=username i]", + "input[id=email i]", + "input[id=alias i]", + "input[class=login i]", + "input[class=user i]", + "input[class=username i]", + "input[class=email i]", + "input[class=alias i]", + "input[name*=login i]", "input[name*=user i]", "input[name*=email i]", @@ -19,6 +36,7 @@ "input[class*=user i]", "input[class*=email i]", "input[class*=alias i]", + "input[type=email i]", "input[autocomplete=email i]", "input[type=text i]", @@ -40,6 +58,44 @@ const SUBMIT_FIELDS = { selectors: [ "[type=submit i]", + + "button[name=login i]", + "button[name=log-in i]", + "button[name=log_in i]", + "button[name=signin i]", + "button[name=sign-in i]", + "button[name=sign_in i]", + "button[id=login i]", + "button[id=log-in i]", + "button[id=log_in i]", + "button[id=signin i]", + "button[id=sign-in i]", + "button[id=sign_in i]", + "button[class=login i]", + "button[class=log-in i]", + "button[class=log_in i]", + "button[class=signin i]", + "button[class=sign-in i]", + "button[class=sign_in i]", + "input[type=button i][name=login i]", + "input[type=button i][name=log-in i]", + "input[type=button i][name=log_in i]", + "input[type=button i][name=signin i]", + "input[type=button i][name=sign-in i]", + "input[type=button i][name=sign_in i]", + "input[type=button i][id=login i]", + "input[type=button i][id=log-in i]", + "input[type=button i][id=log_in i]", + "input[type=button i][id=signin i]", + "input[type=button i][id=sign-in i]", + "input[type=button i][id=sign_in i]", + "input[type=button i][class=login i]", + "input[type=button i][class=log-in i]", + "input[type=button i][class=log_in i]", + "input[type=button i][class=signin i]", + "input[type=button i][class=sign-in i]", + "input[type=button i][class=sign_in i]", + "button[name*=login i]", "button[name*=log-in i]", "button[name*=log_in i]",