Last active
March 8, 2018 13:38
-
-
Save troy-lamerton/66190283480559a881e78c32422d904f to your computer and use it in GitHub Desktop.
run in browser console
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
// toggle the show/hide for file diffs in github pull requests | |
// this script hides all files with 'zipkey-icons' in the name | |
// and the language files | |
var fileDiffs = document.querySelectorAll('.file-header.js-file-header'); | |
for (const fileDiff of fileDiffs) { | |
const text = fileDiff.innerText; | |
if (text.includes('zipkey-icons') || text.includes('/languages')) { | |
const hideButton = fileDiff.querySelector('.btn-octicon.js-details-target[aria-expanded="true"]'); | |
hideButton && hideButton.click() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment