Developer shares 12-year lessons maintaining a Chrome extension on Hacker News DOM
A developer built a lightweight Chrome extension in 2014 to sort Hacker News posts by points, time, or comments, then largely left it untouched for a decade before fully rewriting it in March 2024 with TypeScript, React, and Manifest v3. The extension works by directly manipulating the page's existing DOM rather than calling HN's API, avoiding added latency and privacy concerns. In March 2026, a minor layout change by Hacker News broke the extension silently for all users at once, prompting the developer to issue a hotfix within hours. The incident exposed a deeper architectural flaw: anchoring selectors to positional paths instead of stable semantic class names that HN has preserved since at least 2007. The developer subsequently replaced brittle positional selectors with semantic anchors and set up a daily GitHub Action to detect future HTML changes before users are affected.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in