Skip to content

Instantly share code, notes, and snippets.

@mrmike
Last active February 13, 2018 08:56
Show Gist options
  • Save mrmike/b1e068fbccd7a7a35a30d133f9f1b31e to your computer and use it in GitHub Desktop.
Save mrmike/b1e068fbccd7a7a35a30d133f9f1b31e to your computer and use it in GitHub Desktop.
Github - toggle all files in "File changed" tab
// 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