Skip to content

Instantly share code, notes, and snippets.

@larsxschneider
Last active October 10, 2024 16:49
Show Gist options
  • Save larsxschneider/c024d7308683eefe2704dffe0b706549 to your computer and use it in GitHub Desktop.
Save larsxschneider/c024d7308683eefe2704dffe0b706549 to your computer and use it in GitHub Desktop.
Bookmarklet - Close all files in PR

Installation

Make a new bookmark in your browser. Set the name to Close all PR files (or something else you like) and set the URL to:

javascript:void((function(d){d.querySelectorAll('div:not(.Details--on) > div.file-header > div.file-actions > button').forEach(function(x){x.click()});})(document));

Usage

Click the bookmark to close all files in your PR.

Credit

Based on ideas from @yardensachs and @benjamincharity.

@ClintEsteMadera
Copy link

As of 2020, @aejay-rs solutions worked for me while the original on this gist did not.

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