Last active
July 13, 2022 03:09
-
-
Save hi-ogawa/7886f36839691c5c079d9dea43ae58f1 to your computer and use it in GitHub Desktop.
Github PR diff view auto loading
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
| const PREFIX = "xxx"; | |
| for (const node of document.querySelectorAll('div[data-targets="diff-file-filter.diffEntries"]')) { | |
| const file = node.getAttribute("data-tagsearch-path"); | |
| const button = node.querySelector("button.load-diff-button"); | |
| if (button && file.startsWith(PREFIX)) { | |
| button.click(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment