A Chrome extension that automatically adds comment counts and displays top comments for Hacker News links in The Old Reader RSS feed.
I love reading Hacker News through The Old Reader RSS aggregator, but I always missed the comment counts and discussion context. This extension bridges that gap by:
- 📊 Adding comment badges next to HN links with live counts from the official API
- 💬 Showing top comments directly in the feed (configurable 0-10 comments)
- 🔄 Working automatically as you scroll and load new posts
- ⚡ Being lightweight with smart rate limiting and minimal API calls
✅ Live comment counts: Orange badges showing total comments
✅ Top comments display: See the best-scored comments without leaving your reader
✅ Configurable: Choose how many comments to show (0 disables, just shows counts)
✅ Smart sorting: Comments ranked by score, activity, and recency
✅ Clean formatting: HTML stripped and text truncated for readability
✅ Dynamic detection: Works with infinite scroll and new posts
✅ No duplicates: Prevents reprocessing the same links
The extension:
- Scans The Old Reader for HN item links (news.ycombinator.com/item?id=...)
- Fetches comment count from the official HN Firebase API
- Adds orange badges with the count next to each link
- If enabled, fetches and displays top-level comments sorted by score
- Monitors for new posts loaded during scrolling
- Download or clone this repository
- Open Chrome and go to chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked extension"
- Select this extension's folder
If you prefer not to install the extension, you can use the bookmarklet version:
- Copy the bookmarklet code from bookmarklet.js in this repository
- Create a new bookmark in your browser
- Set the bookmark name to something like "HN Counter"
- Paste the entire code from bookmarklet.js as the bookmark URL
- Visit The Old Reader and click the bookmark to activate
Bookmarklet advantages:
- No extension installation required
- Works in any browser that supports bookmarklets
- Easy to modify settings by editing the maxComments value in the code
To customize the bookmarklet:
- Edit the maxComments value at the top of the bookmarklet code (3 = show 3 comments, 0 = only show counts)
Access the extension settings through Chrome's extension menu:
- Comment display: Choose 0-10 comments to show
- 0 = disabled: Only shows comment counts, no comment text
- Default: 3 comments
- Changes apply immediately to open tabs
Built with:
- Manifest V3 for modern Chrome extensions
- Official Hacker News Firebase API
- MutationObserver for dynamic content detection
- Promise-based async/await for clean API handling
- Smart rate limiting to avoid overwhelming the API
Performance optimizations:
- Batched API requests (3 at a time)
- Debounced scroll detection
- Link deduplication tracking
- Truncated comment text (300 chars max)
- Only fetches first 10 comments per story for analysis
The extension uses the public Hacker News API:
- Story data: https://hacker-news.firebaseio.com/v0/item/{id}.json
- No authentication required
- Rate limited to be respectful to the service
This is a personal utility that became useful enough to share. Feel free to:
- Report issues or suggest improvements
- Submit pull requests
- Fork for your own RSS reader modifications
The extension:
- Only runs on theoldreader.com
- Makes requests only to the official HN API
- Stores only your comment count preference locally
- No data collection, tracking, or external services
MIT License - Feel free to use, modify, and distribute.
Built by someone who loves both RSS feeds and Hacker News discussions. Hope it helps other Old Reader users stay connected to the HN community!
.png)



