Last active
September 20, 2022 18:18
-
-
Save OliverJAsh/bc842d8e50fb946a03af7d7b356d832d to your computer and use it in GitHub Desktop.
GitHub PR snippets
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
// Expand all collapsed commits | |
$$('.js-timeline-progressive-disclosure-button').forEach(el => el.click()); | |
// Expand all collapsed conversations | |
$$('button') | |
.filter(el => el.innerText === 'Load more…') | |
.forEach(el => el.click()); | |
// Expand all collapsed threads | |
const collapsedEls = $$('details.js-resolvable-timeline-thread-container').filter(el => !el.open); | |
collapsedEls.map(el => el.querySelector('.js-toggle-outdated-comments')).forEach(el => el.click()); | |
// Expand all collapsed outdated threads | |
collapsedEls | |
.map(el => el.querySelector('.js-toggle-outdated-comments')) | |
.filter(el => el.querySelector('.show-outdated-button').textContent === 'Show outdated') | |
.forEach(el => el.click()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment