Hacker News new | ask | show | jobs
by pistoriusp 5578 days ago
The position of the articles are stored in an array when the dom is loaded.

When the document scrolls it compares the scroll position to the stored offset positions.

If an article is close enough to the scroll offset it's highlighted.