Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
Last active September 20, 2022 18:18
Show Gist options
  • Save OliverJAsh/bc842d8e50fb946a03af7d7b356d832d to your computer and use it in GitHub Desktop.
Save OliverJAsh/bc842d8e50fb946a03af7d7b356d832d to your computer and use it in GitHub Desktop.
GitHub PR snippets
// 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