Skip to content

Instantly share code, notes, and snippets.

@melfa
Forked from juanca/github_load_all_diffs.js
Last active March 29, 2019 13:59
Show Gist options
  • Save melfa/0209db09596165ddadbcf179bb42afcf to your computer and use it in GitHub Desktop.
Save melfa/0209db09596165ddadbcf179bb42afcf to your computer and use it in GitHub Desktop.
Github PR bookmarklet: Load all file diffs
// Load first 50 diffs with only "Load Diff" button, without reason (this exclude large files, deleted files and so on)
javascript:
Array.from(document.querySelectorAll('.js-diff-load-button-container')).filter(container => !container.querySelector('.hidden-diff-reason')).slice(0, 50).forEach(container => container.querySelector('.load-diff-button').click())
// Load diffs with only "Load Diff" button, without reason (this exclude large files, deleted files and so on)
javascript:
Array.from(document.querySelectorAll('.js-diff-load-button-container')).filter(container => !container.querySelector('.hidden-diff-reason')).forEach(container => container.querySelector('.load-diff-button').click())
// Load all diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment