Automatic Table of Contents for Headings & Tables.
A complete and utter hack that can break at any time, but I’m using it for personal projects and thought I’d share:
a. Setup Arrive-js as a library: https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.js
- Setup CSS: https://gist.github.com/gjroelofs/8cd6d0908ac72783ec97bbf7e0c91ef0
When using the mentioned Chrome plugin, make sure to set it up as follows:
And that the domain is setup correctly to:
This way any auto-dark theme will properly override the CSS colors for the TOC.
- 12/10/'19 - Initial implementation
- 13/10/'19 - Fixed TOC not resetting when moving to a page that has no headers/tables, and not updating after removing / changing headers.
- 13/10/'19 - Fixed selection bug.
- 14/10/'19 - Added in H3 support.