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 () => {
1919 btns . appendChild ( a ) ;
2020 }
2121 } 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+ ) ;
2226 let attempts = 0 ;
2327 let commits ;
2428 do {
25- commits = document . querySelectorAll (
26- "#commits_bucket .Details:not(.branch-action-item)" ,
27- ) ;
29+ commits = getCommits ( ) ;
2830 if ( commits . length > 0 ) {
2931 break ;
3032 } else {
@@ -37,6 +39,7 @@ onBrowse(async () => {
3739 const gen = document . createElement ( "button" ) ;
3840 gen . textContent = `Show ${ commits . length } commits` ;
3941 gen . onclick = ( ) => {
42+ commits = getCommits ( ) ;
4043 const all = Array . from ( commits ) . map ( ( node ) => {
4144 const inner = node . querySelector ( "p" ) ;
4245 return inner . textContent . trim ( ) . replace ( / [ \s \n … ] + $ / g, "" ) ;
You can’t perform that action at this time.
0 commit comments