Skip to content

Instantly share code, notes, and snippets.

@simonbasle
Last active August 16, 2019 09:13
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save simonbasle/b0d47990101e75623ee554db07dff20f to your computer and use it in GitHub Desktop.
Save simonbasle/b0d47990101e75623ee554db07dff20f to your computer and use it in GitHub Desktop.
Collapsing and loading all files in a large pull request, from Chrome Dev Tools
//tested on GitHub 2017-03-24, this collapses all diffs including non-loaded ones
$$('.pr-2').forEach(function(element){if(element.attributes['aria-label'].value == "Toggle diff text") { element.click(); }});
//tested on GitHub 2017-03-24, this loads all deferred diffs
$$('js-detail-target').forEach(function(element){element.click()});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment