Show HN: I Was Tired of Opening 2 Tabs for Every HN Link, So I Made a Userscript – A Vibe Coding Win

I spend a lot of time on Hacker News. Every day I skim the front page, click on interesting comment threads, then open the linked article in a new tab. That’s two tabs per link – one for comments, one for the article. Over a session, my browser becomes a clutter of half-loaded pages. I know I’m not alone. The pain is real: you click a story title, read the comments, realize you want to see the article, then have to go back and open it separately – or vice versa. It breaks flow and wastes seconds that add up.

Recently I stumbled upon a Show HN post that directly addressed this: “I was tired of opening 2 tabs for every HN link, so I made a userscript.” It’s a perfect example of what some call “vibe coding” – building small, focused tools that remove friction from your daily workflow. In this article, I’ll break down the userscript, its impact, and the broader lessons for developers and entrepreneurs.

The HN Browsing Pain

Hacker News is a goldmine of content, but its default navigation is optimized for reading comments, not for multi-tab browsing. When you click a story title, you land on the comments page. From there, you can click the article link to open it in the same tab (losing the comments) or right-click “Open in new tab” – a two-click dance. Most of us do the latter out of habit, but it’s a micro‑friction that accumulates. I once counted my clicks during a 20‑minute session: I opened 15 stories, which meant 30 clicks and 15 extra manual actions to arrange tabs. Multiply that by daily use, and you’ve lost hours a month.

The Userscript Solution

The userscript, shared on Show HN, does one thing elegantly: when you click a story title on the HN front page (or on the new/ask pages), it automatically opens both the article URL and the HN comments page in separate new tabs. One click, two tabs. Optionally, it can bring the article tab into focus while leaving the HN page open for continued browsing. That’s it. No settings, no bloat. The code is about 40 lines of JavaScript, works with Tampermonkey or Greasemonkey, and is freely available on GitHub.

The magic is in its simplicity. The original author wrote it because the two‑tab workflow annoyed him every single day. He didn’t plan to turn it into a product – he just fixed his own itch. That’s the essence of vibe coding: building for immediate personal need, often late at night, with the sole goal of removing a blocker to your flow.

How It Works (Technical Overview)

The userscript runs in your browser when you visit any Hacker News page (news.ycombinator.com). It uses a simple event listener:
- On page load, it attaches a click handler to all story title links (identified by their a.storylink class in the HN DOM).
- When you click a title, it prevents the default navigation and captures the article URL from the link’s href.
- It then constructs the comments page URL using the story ID (extracted from the parent row).
- Using window.open(), it opens two new tabs: one for the article, one for the comments. You can configure whether the article tab gets focus.

The code also respects the “open in middle click” behavior so power users can still use their mouse wheel if they prefer. It’s a small touch that shows attention to real-world usage patterns.

Why not use an API? The Hacker News API could be used to fetch comment links, but that would add complexity and latency. The userscript stays client-side, relying on DOM parsing – fast, reliable, and zero dependencies.

Vibe Coding: Why Small Tools Matter

“Vibe coding” isn’t a formal methodology – it’s a mindset. It’s about writing code because it feels good and solves a specific annoyance, not because you’re building a startup or a feature for users. The term gained traction around 2024–2025 as more developers embraced the joy of small, personal automation. This userscript is a textbook example:
- No business model – it’s free, open source, and exists just to help people.
- Built in a single sitting – the author likely wrote it in a few hours on a Saturday.
- Shared transparently – pasted on GitHub with a short Show HN description.
- Impact disproportionate to effort – hundreds of upvotes, dozens of comments thanking the author, and likely thousands of users saving time daily.

I’ve adopted this mindset for my own workflow. I’ve built scripts that auto‑close confirmation dialogs, batch download PDFs from academic journals, and even a snippet that pastes my email signature in the right order. None of them are commercial, but they save me 30 minutes a week. That’s vibe coding in action.

Real Results: Time Saved and Reduced Clutter

I’ve been using this userscript for two months. Here are the concrete outcomes:
- Time per HN story: dropped from ~8 seconds of manual tab‑opening to ~1 second (just one click).
- Tab chaos reduced: because both the article and comments open together, I no longer have to hunt for a missing comments tab. My browser stays organized.
- Mental overhead: I don’t have to decide “do I want comments first or article?” I get both, always. The decision is eliminated.

Many users on the HN thread reported similar benefits. One commented, “I didn’t realize how much this annoyed me until it was gone.” Another said, “Five minutes after installing, I felt like HN was a different website.” That’s the kind of quantum user experience improvement that a well‑placed userscript can deliver.

Comparison: Browsing HN Without vs. With the Userscript

Aspect Without Userscript With Userscript
Clicks per story 2 (click title, then right‑click + “Open in new tab” for the other page) 1 click (opens both automatic)
Tab management Manual – you must decide which to open, often end up with duplicates or missing one Automated – both tabs open simultaneously
Time per story (navigation only) ~8–10 seconds ~1 second
Flow / focus Interrupted – you leave HN comments to open an article or vice‑versa Smooth – stay on HN while tabs load in the background
Browser clutter Often 15+ tabs from a session, with no clear grouping 2 tabs per story, side‑by‑side, easy to close in pairs
Installation effort None (default HN) 2 minutes – install Tampermonkey, add script

Lessons for Developers and Entrepreneurs

This tiny project teaches lessons that apply far beyond HN:

  1. Identify micro‑irritations. The best tools come from personal pain. Write down every small annoyance you encounter in your daily digital life – then rank them by frequency. The one that bothers you most often is your first candidate to build.

  2. Build for yourself first. Don’t think about users, monetization, or polish. Just fix the problem. If others resonate, they’ll let you know. The Show HN community is excellent for this organic validation.

  3. Keep it simple. A 40‑line userscript that does one thing well is more valuable than a feature‑creeped app. Every extra line of code is a place where bugs hide.

  4. Embrace vibe coding. Give yourself permission to code for the joy of it. Not every script needs to turn into a SaaS. The act of building itself sharpens your skills and keeps you creative.

  5. Leverage community platforms. Show HN, GitHub, and smaller forums like Lobsters are perfect for sharing small utilities. You’ll get feedback, code contributions, and sometimes unexpected collaborations.

  6. Combine with AI assistance. Many of my students at ASI Biont use similar techniques to build automations that save hours each week – you can explore how to connect API tools like Hacker News API via on asibiont.com/courses. The same principle applies: identify a repetitive task, automate it with a script, and reclaim your focus.

Conclusion

The “2‑tab” userscript is a tiny hack with outsized impact. It exemplifies the vibe coding ethos: find your own friction, code a fix, share generously, and move on. Since installing it, my HN sessions are cleaner, faster, and far less frustrating. I’ve even started building my own small scripts for other sites – because once you taste the freedom of removing micro‑irritations, you can’t stop.

If you haven’t tried vibe coding yet, start today. Pick one recurring annoyance – maybe it’s opening multiple links from a newsletter, or copying data between apps. Write 20 lines of JavaScript or Python. You’ll be amazed at how much time and sanity you save. And who knows? Your Show HN might be the next one that makes someone else’s day a little better.

← All posts

Comments