Skip to content

Instantly share code, notes, and snippets.

@erikdw
Forked from juanca/github_load_all_diffs.js
Last active November 4, 2020 15:50
Show Gist options
  • Save erikdw/9dae662848a09033cd79c8a9ef55413b to your computer and use it in GitHub Desktop.
Save erikdw/9dae662848a09033cd79c8a9ef55413b to your computer and use it in GitHub Desktop.
Github PR bookmarklet: Load all file diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click());
document.querySelectorAll('.js-details-target').forEach(node => node.click());
// Both of those buttons should have the '.btn-link' class too, but I wasn't able to quickly figure out how to
// add an AND condition to that. Tried the below, didn't work:
//document.querySelectorAll('[.btn-link][.load-diff-button]').forEach(node => node.click());
@tonytrangmail
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment