@@ -47,10 +47,10 @@ function onNodeRemoved(target) {
4747 return ;
4848 if ( target . nodeType != Node . ELEMENT_NODE )
4949 return ;
50- var classes = target . getAttribute ( "class" ) ;
50+ var classes = target . classList ;
5151 if ( ! classes )
5252 return ;
53- if ( classes == "twttr-dialog-container" ) {
53+ if ( classes . contains ( "twttr-dialog-container" ) ) {
5454 // A dialog was just dismissed.
5555 // Focus the last focused tweet.
5656 lastFocusedTweet . focus ( ) ;
@@ -63,9 +63,9 @@ function onFocus(evt) {
6363 if ( target == document )
6464 return ;
6565 var tag = target . tagName ;
66- var classes = target . getAttribute ( "class" ) ;
66+ var classes = target . classList ;
6767
68- if ( tag == "INPUT" && classes == "twttr-hidden-input" ) {
68+ if ( tag == "INPUT" && classes . contains ( "twttr-hidden-input" ) ) {
6969 // This is an input field for a confirmation prompt.
7070 // Pressing enter here will activate the OK button.
7171 if ( target . getAttribute ( "aria-activedescendant" ) )
@@ -78,7 +78,7 @@ function onFocus(evt) {
7878 elm . setAttribute ( "role" , "button" ) ;
7979 target . setAttribute ( "aria-activedescendant" , id ) ;
8080
81- } else if ( tag == "TEXTAREA" && classes == "tweet-box" ) {
81+ } else if ( tag == "TEXTAREA" && classes . contains ( "tweet-box" ) ) {
8282 // This is a tweet box.
8383 if ( target . getAttribute ( "aria-describedby" ) )
8484 return ;
0 commit comments