A userscript that adds a table of contents to any website

auto-toc

auto-toc

Displays a table of contents for any website, making it easier to read and navigate long articles, documentations, and online books.

Generate TOC(table of contents) for any website.

Switch black/white themes automatically according to your compupter’s light/dark mode.

Features

  • Work properly on any website that conforms to the HTML standard and uses HTML heading tags properly (e.g. Wikipedia.com).
  • Accurate article and heading detection
  • A clean user interface
  • Highlight current heading
  • Click to jump to headings
  • Drag the panel to your preferred position
  • Only runs when you actually use it
  • Dark mode, automatically
  • 6 heading levels
  • Expand all headings to a specific level
  • Support HTML label:
    • H1, H2, H3, H4, H5, H6
    • <strong>
    • <b>

. . .

Installation & Usage

By default, it is not open. You need to go to the plug-in menu to open the switch for the website that wants to open the toc. The plug-in will remember this switch, and the toc will be generated automatically according to the switch when you open the website the next time.

Inspired by