Userscript - make specific long files in github online diff view shorter, since you don't need to check them.
// ==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