Created
February 4, 2014 23:05
-
-
Save v-dimitrov/8814250 to your computer and use it in GitHub Desktop.
Userscript - make specific long files in github online diff view shorter, since you don't need to check them.
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
// ==UserScript== | |
// @name GitHub Suppress Diffs | |
// @version 2013.10.29 | |
// @namespace FET | |
// @description Suppress style.css | |
// @include http*://github.com/* | |
// ==/UserScript== | |
// Files to suppress: | |
suppressFiles([ | |
"telerik/css/style.css", | |
"documentation/styles/css/theme.css" | |
]); | |
// Call resize on the specified files: | |
function suppressFiles(path){ | |
for (var url in path) { | |
resizeDiff(document.querySelector('.meta[data-path="' + path[url] + '"]').nextElementSibling); | |
} | |
} | |
// Resize the diff area in github: | |
function resizeDiff(obj) { | |
obj.style.height = "200px"; | |
obj.style.overflow = "auto"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment