Created
June 14, 2023 17:06
-
-
Save drewrwilson/0002f3f125e09e387649e91cad41efe1 to your computer and use it in GitHub Desktop.
Uncheck all "Viewed" checkbox on a github pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
π Ok, imagine this: You're reviewing a pull request with 107 files. That's a lot of files! | |
β To keep track of your place while you review, you're clicking that nice Viewed checkbox | |
next to each file after you review it. Great, that button collapses the file and make it much more | |
manageable. | |
π± But wait. You're through 47 files and the author just pushed a change. Oh no. Did the commit impact those | |
files? 42 files are collapsed. What are you supposed to do, manually uncheck 47 files?? AHHHHHH!! | |
π Don't panic! | |
1. Open your console on the pull request webpage. | |
2. Paste this snippet into your console. | |
3. Slam that enter key. | |
This script will select all the currently-checked Viewed checkbox and click on them, unselecting them all in a second. | |
π π π | |
*/ | |
document.querySelectorAll("input.js-reviewed-checkbox[checked]").forEach((element) => { | |
element.click(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment