Created
December 19, 2018 13:46
-
-
Save tamvm/1f940806680bca895cf5a0435f22bfa8 to your computer and use it in GitHub Desktop.
tampermonkey-github-expand-all
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
// ==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