Created
September 9, 2019 14:08
-
-
Save said-and-done/1e80df737fa6f0094a1b6ad771b833a7 to your computer and use it in GitHub Desktop.
Github Wiki: generate table of contents from sidebar
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
out = ''; | |
document.querySelectorAll('li.Box-row').forEach((t) => { | |
var a = t.querySelector('a'); | |
var text = a.innerText; | |
var link = a.getAttribute('href'); | |
out += `## [${text}](${link})\n`; | |
}); | |
console.log(out); | |
copy(out); | |
//paste clipboard content into Home.md |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment