Skip to content

Instantly share code, notes, and snippets.

@danactive
Last active September 18, 2017 04:16
Show Gist options
  • Save danactive/2ca5ccdcbbd343153de853a0ced18d25 to your computer and use it in GitHub Desktop.
Save danactive/2ca5ccdcbbd343153de853a0ced18d25 to your computer and use it in GitHub Desktop.
Get all the filename hyperlink text from GitHub repo
// filenames only
Array.from(document.querySelectorAll('.js-navigation-open')).filter(x => x.title).map(link => link.title).join('\n')
// filenames as markdown links
Array.from(document.querySelectorAll('.js-navigation-open')).filter(x => x.title).map(link => `* [${link.title}](${link.title})`).join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment