Created by: malchata
Persists Table of Contents open/closed state across navigations using localStorage. Tested on:
- Firefox Nightly on macOS 10.15.6
- Chrome Canary on macOS 10.15.6
- Safari Technical Preview on macOS 10.15.6
- Chrome on Android 7.1.1
- Safari on iOS 14.0.1
Modifications are made to Chris Ferdinandi's tableOfContents.js. The persistence is only enabled on pages where a toc element is available, its parentNode is a <details> element, and localStorage is available.