File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,14 @@ onBrowse(async () => {
19
19
btns . appendChild ( a ) ;
20
20
}
21
21
} else if ( / \/ c o m p a r e \/ / . test ( location . pathname ) ) {
22
+ const getCommits = ( ) =>
23
+ document . querySelectorAll (
24
+ "#commits_bucket .Details:not(.branch-action-item)" ,
25
+ ) ;
22
26
let attempts = 0 ;
23
27
let commits ;
24
28
do {
25
- commits = document . querySelectorAll (
26
- "#commits_bucket .Details:not(.branch-action-item)" ,
27
- ) ;
29
+ commits = getCommits ( ) ;
28
30
if ( commits . length > 0 ) {
29
31
break ;
30
32
} else {
@@ -37,6 +39,7 @@ onBrowse(async () => {
37
39
const gen = document . createElement ( "button" ) ;
38
40
gen . textContent = `Show ${ commits . length } commits` ;
39
41
gen . onclick = ( ) => {
42
+ commits = getCommits ( ) ;
40
43
const all = Array . from ( commits ) . map ( ( node ) => {
41
44
const inner = node . querySelector ( "p" ) ;
42
45
return inner . textContent . trim ( ) . replace ( / [ \s \n … ] + $ / g, "" ) ;
You can’t perform that action at this time.
0 commit comments