Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Github PR bookmarklet: Load all file diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
@benguild

This comment has been minimized.

Copy link

@benguild benguild commented Oct 17, 2017

Thanks, I use this all of the time.

@chri7325

This comment has been minimized.

Copy link

@chri7325 chri7325 commented Dec 28, 2017

Awesome. Will save me quite a lot of carpel-tunnel clicks.

@sarojkh

This comment has been minimized.

Copy link

@sarojkh sarojkh commented May 22, 2018

Thank you. Bookmarked.

@melfa

This comment has been minimized.

Copy link

@melfa melfa commented Mar 29, 2019

Load first 50 files with only "Load Diff" button, without reason (this exclude large files, deleted files and so on):
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())

@uttamraj-pando

This comment has been minimized.

Copy link

@uttamraj-pando uttamraj-pando commented Apr 28, 2020

awesome.would have received lot of upvotes in stackoverflow

@ElectricRCAircraftGuy

This comment has been minimized.

@juanca

This comment has been minimized.

Copy link
Owner Author

@juanca juanca commented Oct 9, 2020

oh, if you're keeping a collection around. here is another i use pretty regularly:

https://gist.github.com/juanca/669c59f15a17e20022b8bd78b12889e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.