Hacker News new | ask | show | jobs
by uo21tp5hoyg 938 days ago
Wow I really like that little mini-map on the right...
1 comments

+1. Does someone know how to do that?
The minimap contains a copy of the content, but with `transform: scale`. The rest is handling `window.onscroll` and mouse events on the overlay.
Found a canvas-based library for this: https://larsjung.de/pagemap/. Definitely not what OP uses, where the minimap is a shrunk copy of the content markup, with all the drawbacks, such as page search finding the same item twice.
The author should really add at least aria-hidden="true" to the minimap element.