Created
May 24, 2023 11:53
-
-
Save frankcalise/01441e8b30136272adfc3fed69fa0686 to your computer and use it in GitHub Desktop.
Expand GH PR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for really long PR pages, execute this function to auto press "Load more" until done | |
function expandPR() | |
{ | |
var loadMore = document.querySelector('.ajax-pagination-btn'); | |
if (loadMore.length !== 0) | |
{ | |
console.log('Clicking all these "Load more": ' + loadMore.length); | |
loadMore.click(); | |
setTimeout(expandPR, 500); | |
return; | |
} | |
loadMore = document.querySelector('.ajax-pagination-btn:visible:contains(Loading)'); | |
if (loadMore.length !== 0) | |
{ | |
console.log('"Load more... " are loading: ' + loadMore.length); | |
setTimeout(expandPR, 500); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment