You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on updating a URL through history.pushState when scrolling through a long document. Since this document uses already tocbot, ideally it would trigger the url change at the same time as the table of contents gets updated, so that it stays in sync.
To do it, I would have to replicate quite a bit of tocbot functionality, so I am wondering if you considered an option in tocbot to update the URL on scroll. The code for doing it is relatively simple:
I am working on updating a URL through
history.pushState
when scrolling through a long document. Since this document uses already tocbot, ideally it would trigger the url change at the same time as the table of contents gets updated, so that it stays in sync.To do it, I would have to replicate quite a bit of tocbot functionality, so I am wondering if you considered an option in tocbot to update the URL on scroll. The code for doing it is relatively simple:
(it's just a POC code, throttling needs to be added).
If you think it makes sense, I can prepare a PR.
The text was updated successfully, but these errors were encountered: