Last active
February 13, 2018 08:56
-
-
Save mrmike/b1e068fbccd7a7a35a30d133f9f1b31e to your computer and use it in GitHub Desktop.
Github - toggle all files in "File changed" tab
This file contains 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
// Toggles all files in "Files changed" tab in pull request | |
// Can be exectued through javascript console | |
var buttons = document.querySelectorAll('button[aria-label="Toggle diff text"]') | |
for (var i = 0; i < buttons.length; i++) { | |
buttons[i].click() | |
} | |
// One liner that can be used as a bookmark | |
javascript:void((function(d){d.querySelectorAll('button[aria-label="Toggle diff text"]').forEach(function(x){x.click()});})(document)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment