Skip to content

Instantly share code, notes, and snippets.

@hogashi
Created March 21, 2017 15:35
Show Gist options
  • Save hogashi/da13b63b7d18dc76f70753e053ddaf04 to your computer and use it in GitHub Desktop.
Save hogashi/da13b63b7d18dc76f70753e053ddaf04 to your computer and use it in GitHub Desktop.
removes diff stat of binary files (shown as "BIN") at "file changes" in GitHub.
Array.from(
document.getElementsByClassName('js-diff-progressive-container')
)
.forEach(container => {
Array.from(
container.getElementsByClassName('Details')
)
.forEach(detail => {
if (detail.getElementsByClassName('diffstat')[0].innerHTML.match(/BIN/)) {
detail.parentNode.removeChild(detail)
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment