Skip to content

Instantly share code, notes, and snippets.

@tamvm
Created December 19, 2018 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamvm/1f940806680bca895cf5a0435f22bfa8 to your computer and use it in GitHub Desktop.
Save tamvm/1f940806680bca895cf5a0435f22bfa8 to your computer and use it in GitHub Desktop.
tampermonkey-github-expand-all
// ==UserScript==
// @name (github) Expand all hidden file contents
// @namespace http://github.com/
// @version 0.1
// @description (github) Expand all hidden file contents
// @author You
// @match https://github.com/*/*/pull/*
// @grant GM_registerMenuCommand
// ==/UserScript==
(function() {
'use strict';
var expandHiddenFileContents = function() {
document.querySelectorAll("button.load-diff-button").forEach(function(el) { el.click() })
}
GM_registerMenuCommand('(github) Expand all hidden codes', function() {
expandHiddenFileContents();
}, 'r');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment