Skip to content

Instantly share code, notes, and snippets.

@endeepak
Created May 2, 2018 13:13
Show Gist options
  • Save endeepak/5b6d30c6f3afb159b461456ddf651f3a to your computer and use it in GitHub Desktop.
Save endeepak/5b6d30c6f3afb159b461456ddf651f3a to your computer and use it in GitHub Desktop.
document.querySelectorAll('h1,h2,h3,h4,strong').forEach(function(header) {
console.log(' '.repeat(header.tagName.replace('STRONG', 'H5').replace('H', '')) + header.textContent)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment