Bo

Bookmarklet to highlight recent comments in a Hacker News thread

Hacker News

Bookmarklet to highlight recent comments in a Hacker News thread

I find myself often checking into a thread to see the latest replies, which usually means visually scanning for comments that have "minutes" in the timestamp. I decided to automate this (and a bit extra) with a bookmarklet. Create a new bookmark in your web browser and paste the following into the URL field: javascript:(function() { const cutoffStr = prompt("Highlight posts in the last:", "1 hour"); function millisForStr(s) { const [num, unit] = s.split(' '); const parsedNum = Number(num); return unit.includes('minute') ? parsedNum * 60 * 1000 : unit.includes('hour') ? parsedNum * 60 * 60 * 1000 : unit.includes('day') ? parsedNum * 24 * 60 * 60 * 1000 : NaN; } Array.from(document.querySelectorAll('.age')) .map(el => { const interval = millisForStr(el.innerText); return [el, new Date(Date.now() - interval)]; }) .forEach(([el, date]) => { const cutoff = new Date(Date.now() - millisForStr(cutoffStr)); if (date >= cutoff) { el.parentElement.parentElement.parentElement.style.background = "rgba(255, 215, 0, 0.5)"; } else { el.parentElement.parentElement.parentElement.style.background = null; } }) })(); When clicked, you'll be prompted for a string of the form "1 hour" or "23 minutes" or "2 days", and after submitting you'll see all comments on the current page that fall within that interval highlighted with a gold-colored background. Let me know what you think or if you'd like any other small features!

Share card

Actual performance

1points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
75%75% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: hacker news, ide, 000 · Missing: https docs, excited, just released
67%67% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, visual · Missing: mac, agents, macos
59%59% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
47%47% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr · Missing: mrr, revenue, profit
18%18% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
2%2% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Co
Collapse Comments on Hacker News73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Collapse Comments on Hacker News

Hacker News93
Ha
Hacker News Comments73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hacker News Comments

Hacker News189
Co
Collapsible comments for Hacker News73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Collapsible comments for Hacker News

Hacker News1
hn
hncynic – Generate Hacker News Comments from Titles56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

hncynic – Generate Hacker News Comments from Titles

Hacker News114
Ha
Hacker News Live Comments Bookmarklet56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hacker News Live Comments Bookmarklet

Hacker News15
Vi
Visual representation of Hacker News comments66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Visual representation of Hacker News comments

Hacker News11
Ha
Hacker News but it's only the comments with none of the context71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hacker News but it's only the comments with none of the context

Hacker News2
Ha
Hacker News Telegraph: News generated from your comments68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hacker News Telegraph: News generated from your comments

Hacker News1
Au
Automatically upvote downvoted comments on Hacker News70%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Automatically upvote downvoted comments on Hacker News

Hacker News2
HN
HNLikes – The most frequently posted links in Hacker News comments59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HNLikes – The most frequently posted links in Hacker News comments

Hacker News1