File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ const PREDEFINED_SITELIST = [
5555 'https://signin.ebay.ph/*' ,
5656 'https://login.yahoo.com/*' ,
5757 'https://id.atlassian.com/*' ,
58- 'https://www.fidelity.com/*'
58+ 'https://www.fidelity.com/*' ,
59+ 'https://twitter.com/i/flow/login'
5960] ;
6061
6162const kpxcSites = { } ;
@@ -97,6 +98,25 @@ kpxcSites.exceptionFound = function(identifier) {
9798 return false ;
9899} ;
99100
101+ /**
102+ * Handles a few exceptions for certain sites where 2FA field is not regognized properly.
103+ * @param {object } field Input field Element
104+ * @returns {boolean } True if an Element has a match with the needed indentfifiers and document location
105+ */
106+ kpxcSites . totpExceptionFound = function ( field ) {
107+ if ( ! field || field . nodeName !== 'INPUT' ) {
108+ return false ;
109+ }
110+
111+ if ( document . location . href === 'https://twitter.com/i/flow/login'
112+ && field . autocomplete === 'on' && field . dir === 'auto'
113+ && field . name === 'text' && field . type === 'text' ) {
114+ return true ;
115+ }
116+
117+ return false ;
118+ } ;
119+
100120kpxcSites . expectedTOTPMaxLength = function ( ) {
101121 if ( document . location . origin . startsWith ( 'https://www.amazon' )
102122 && document . location . href . includes ( '/ap/mfa' ) ) {
Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ kpxcTOTPIcons.isAcceptedTOTPField = function(field) {
5252 return true ;
5353 }
5454
55+ if ( kpxcSites . totpExceptionFound ( field ) ) {
56+ return true ;
57+ }
58+
5559 return false ;
5660} ;
5761
You can’t perform that action at this time.
0 commit comments