Skip to content

Instantly share code, notes, and snippets.

@michellemartir
Created August 10, 2018 13:55
Show Gist options
  • Save michellemartir/035361598e29df33d948d7b6d7865888 to your computer and use it in GitHub Desktop.
Save michellemartir/035361598e29df33d948d7b6d7865888 to your computer and use it in GitHub Desktop.
Show Section Headings in Console
for (var i = 0, headings = $$('h1,h2,h3,h4,h5,h6');
i < headings.length; i++) {
console.log(headings[i].textContent.trim() + " " +
headings[i].tagName,
headings[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment