Dear Console, give me a table of contents of the document indented by heading level
Topics: structure, accessibility, scraping
Show all 16 "Dear Console" snippets
This is a repository of little scripts you can use in the browser console to achieve the described task. Hence, "Dear Console,…".
To use the scripts shown here, you need to open the browser developer tools (pressing F12), open the Console tool, paste them in and hit `Enter`. If you use a Chromium based browser (Chrome, Edge, Brave, Opera, Vivaldi…) you can also use them in Snippets.