Skip to content

Instantly share code, notes, and snippets.

@neogeek
Last active March 10, 2019 22:56
Show Gist options
  • Save neogeek/f093ea77180187ff363f88ec490c754b to your computer and use it in GitHub Desktop.
Save neogeek/f093ea77180187ff363f88ec490c754b to your computer and use it in GitHub Desktop.
[].slice.call(document.querySelectorAll('#files .file.open'))
.filter(elem => elem.querySelectorAll('.hidden-diff-reason, .data.empty').length == 1)
.map(elem => elem.parentNode.removeChild(elem));
[].slice.call(document.querySelectorAll('#files .file.open'))
.filter(elem => elem.querySelectorAll('.hidden-diff-reason, .data.empty').length == 1)
.map(elem => elem.querySelector('[aria-label^="Toggle"]').click());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment