File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ function initOnHashChangeAction(domains) {
1616 if ( domains ) allDomains += domains
1717
1818 // Take string -> make array -> make queries -> avoid nil -> join queries to string
19- var selectors = allDomains . replace ( / \s / , '' ) . split ( ',' ) . map ( function ( name ) {
19+ var selectors = allDomains . replace ( / \s / g , '' ) . split ( ',' ) . map ( function ( name ) {
2020 if ( name . length ) return ( ".AO [href*='" + name + "']" )
2121 } ) . filter ( function ( name ) { return name } ) . join ( ", " )
2222
@@ -63,8 +63,8 @@ function initOnHashChangeAction(domains) {
6363 } )
6464 }
6565
66- // Go to thread instead of .diff link (pull request notifications)
67- url = url . match ( / \. d i f f / ) ? url . slice ( 0 , url . length - 5 ) : url
66+ // Go to thread instead of diffs or file views
67+ url = url . match ( / ^ ( . + \/ \d + ) / ) [ 1 ]
6868 var link = document . createElement ( 'a' )
6969 link . href = url
7070 link . className = 'github-link T-I J-J5-Ji lS T-I-ax7 ar7'
You can’t perform that action at this time.
0 commit comments