Last active
March 27, 2019 07:19
Star
You must be signed in to star a gist
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