Last active
March 27, 2019 07:19
-
-
Save girvan/f2c1755abc7f5409eb3bd756611cb2e5 to your computer and use it in GitHub Desktop.
Exclude some file paths in git file changes
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
document.querySelectorAll("#toc li").forEach(function(li, idx){ | |
if(li.innerText.indexOf('/SOME-PATH-YOU-WANT-TO-EXCLUDE/') === -1) | |
return; | |
var id = li.querySelector('a').href.split('#')[1]; | |
var block = document.querySelector('a[name=' + id + ']').nextElementSibling; | |
block.parentNode.removeChild(block); | |
li.parentNode.removeChild(li); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment