Show HN: I was tired of opening 2 tabs for every HN link, so I made a userscript
Posted by twalichiewicz 4 days ago
HN is great for the links people share, but a big part of the value I get comes from reading the discussion around them. I realized I was always opening the article in one tab and the comments in another, constantly switching back and forth.
I figured there was probably a simpler way, so I threw together this userscript to merge the two.
1. Clicking a link from Hacker News opens the article with a side panel containing the discussion. It doesn't require your credentials, is resizable, and is easy to tweak if you want to customize it.
2. If you land on an article that has previously been shared on HN, the script finds the existing discussion and adds a button in the top-right to open the panel.
Feedback welcome.
Comments
Comment by kccqzy 3 days ago
Feature 1 is IMO less useful. It just suggests that people are bad at window management. We didn't like overlapping windows and finding them, so we created tabs inside windows. Then we wanted to see two things at the same time, so we created split views inside tabs (Chrome and Firefox both had this). With a good window manager neither would be necessary. Sadly the community prefers to solve this at the application level rather than the desktop level; I'm currently using Forge (https://github.com/forge-ext/forge) but sadly it's becoming unmaintained.
Comment by vladvasiliu 3 days ago
Not only does it "prefer", they actually enforce this. I haven't found any sensible way of completely disabling tabs in either Firefox or Chromium. FF has some janky extension that kinda sorta works, but it's a hideous workaround consisting of hiding the tab bar and automatically detaching most new tabs. With the rest of the tabs, you're SOL. Haven't found anything at all for chrome.
I very much prefer managing windows with my my... window manager. Which works the same way with all applications.
Comment by pastage 3 days ago
Comment by vladvasiliu 3 days ago
But that's not the point. I'm not against applications offering those possibilities, and when I have to use Windows for work, I'm happy browsers have them.
My point is that they shouldn't force users into this way of working. Browsers already support multiple windows. Why can't I just disable the whole tab feature if I don't care for it? A while ago, when tabs were still new, you had to actively opt in. The default was a new window for everything. Now this option is completely gone for some reason.
Comment by nektro 2 days ago
Comment by ta8903 3 days ago
Comment by jiehong 3 days ago
So that any application could have tabs, if the desktop manager would allow you to group windows as such. Same with showing a split view within such a tab as well.
I think I agree with that. I could imaging that the browser containers of tabs would make a ton of sense if I could make a container of windows handled as tabs across different applications at the window manager level.
Comment by yoz-y 3 days ago
All that being said, navigation in such a structure would be a mess that would need a lot of learning. Also I’m sure a window manager like this already exists somewhere.
A system wide search within tabs would help more maybe.
Like chrome’s cmd+A but for all tabs everywhere
Comment by vladvasiliu 3 days ago
Not only that, but you could actually mix "tabs" from separate applications!
Comment by TeMPOraL 3 days ago
The general problem is that having WM handle in-app tabs means the WM has to support every single hare-brained idea about meaning and role of tabs that app developers invent, which is infeasible. Even with browsers - until recently, you had like just two types of tabs: regular tabs, and porn-mode (er, "private browsing") tabs. Then came "account containers" or whatever it was in Firefox. Then came tab groups, reading groups, and tons of other nonsense.
OTOH, I can dream of an ideal world where the OS manages all tabs for all apps via combination of Sidebery (better "tree style tabs") and a tiling WM.
Comment by dvdkon 3 days ago
There are sadly hardly any WMs now with tabs, so having them support tree style tabs as well doesn't look too realistic.
Comment by jbstack 3 days ago
I only keep tabs open that I'm actively working on right now (or am imminently about to switch back to). I regularly close tabs (and windows for that matter) that are only open because I forgot about them, or that I might use again but not until hours or days later. If I need them later I just open them again.
For me, having hundreds of things open at once just creates clutter that makes it harder to focus.
Comment by ta8903 3 days ago
Using Sidebery panes and treestyle tabs makes it really easy to organize your tabs, I have a tree with all my tasks with relevant documentation or subtasks under each task, and I have a separate panes with all the documentation I refer constantly at the top and everything I'm reading right now at the bottom. I definitely have a lot of tabs I opened to read and never closed, but that doesn't matter since everything is arranged in an approximation of a 2D space, I still know where to look for something specific. I'm sure you feel this is weird because you've never used a tree-style tab manager, but personally I can't go back to a regular browsing setup.
Comment by jbstack 3 days ago
I think I'd still maintain a conceptual difference between sites that are source material (e.g. documentation) or apps (e.g. Google Translate), and those that are just for browsing (e.g. news, blogs) and are more ephemeral (I may read it now, or keep it for later, but either way I'll be done with it).
You'd open a PDF, Word document, or app in its own window which you'd manage with your DE / WM. To me it feels like a bit of an anti-pattern to have some of this type of content handled by my WM, and others by a tree-style tab manager, when they are the same "type" of content. I want to be able to press the same keyboard shortcut to switch to my documentation whether it happens to be a PDF or a website.
On the other hand, there isn't anything else really equivalent to browsing-type content, so the tree-style tab manger feels more natural to me there.
Comment by jitbit 3 days ago
https://chromewebstore.google.com/detail/hidhfijjhnnajlkikij...
Comment by ksec 3 days ago
I got used to opening a new tab for things to read before RSS first invented. So I guess it became a 2nd nature. I also think it is better to read the article first before going to the comments session. So Feature 1 isn't that useful.
For feature 2 it is great. Although thinking about it I kind wish this could be done without browser extension but an actual site feature by HN.
Comment by perpil 4 days ago
1. If you name your script with the extension .user.js it is easier to click on to automatically install at least with tampermonkey. 2. When I went to this link from the main page, on mobile I had to scroll to the right to see the (-) to minimize because the sidebar was too large: https://elizabethtai.com/2026/06/10/substack-writers-you-nee... It may make some sense to start minimized so I can read the article first, but I can easily modify the script to do that.
Comment by swyx 4 days ago
Comment by noncovalence 4 days ago
Comment by bstsb 3 days ago
Comment by noncovalence 3 days ago
Comment by twalichiewicz 4 days ago
A userscript also let me iterate quickly without dealing with extension packaging and permissions, but being able to see and tweak the code was a big part of the appeal.
Comment by perpil 4 days ago
Comment by moritzwarhier 4 days ago
Apart from that, there are APIs exclusive to extensions, e.g. instrumenting client-side communication among tabs with different origins, listing all tabs, basically accessing a special API that sits on a higher-level context, and, while gating certain functionality behind user approval, and forbidding other functionality completely (at least in Manifest 3.0), extensions with the corresponding permissions can do more than a script running in the page context. They can inject these as well, though, even overriding CSP sometimes, as far as I know?
The main problem with these permissions, and WebExtension 3.0 partly was an attempt to improve this, or at least claims it: most people give a second of doubt at best when installing an extension, as long as they think it comes from a trusted source.
Comment by grimgrin 4 days ago
thought I realize "if it works it works", https://github.com/Tampermonkey/tampermonkey
Comment by adrianwaj 4 days ago
https://greasyfork.s3.us-east-2.amazonaws.com/sokzpb2ztmatlh... (screenshot)
https://greasyfork.org/en/scripts/588721-hacker-news-comment...
I'd improve it by counting top level comments next to items but that would slow it down. Still need to make some slight changes like closing sidebar by re-clicking orange (beyond just right-clicking sidebar.)
It's very fast and speeds up thinking overall.
Comment by Barbing 4 days ago
zip is available only if you're logged-in on GitHub site
Haven’t seen that before.Comment by ta8903 3 days ago
I would say only go for extensions over userscript if you need a settings menu (or any of the APIs the sibling comment mentions).
Comment by tcfhgj 3 days ago
Comment by aaron695 3 days ago
Comment by pluc 4 days ago
Comment by dagurp 4 days ago
Comment by Izkata 3 days ago
Comment by vdfs 3 days ago
Edge had the open links in the other split, chrome doesn't
Comment by Barbing 4 days ago
Comment by squigz 4 days ago
Comment by wccrawford 3 days ago
It was 50/50, with HN on the left, so maybe it's not as easy to read the post in smaller windows. Otherwise, seems to provide the same service, essentially.
Comment by werdnapk 3 days ago
I generally open the HN comment link, then click the article link, read it, then click back to read the comments.
I'll see if this split view feature works better for me though, but I think I'd prefer a horizontal split instead of vertical.
Comment by devsda 3 days ago
If any of those vim extensions support link+split, and allow interaction with splits that would be even better.
Comment by Izkata 3 days ago
Comment by bovine3dom 1 day ago
Comment by monkpit 3 days ago
Comment by HelloUsername 3 days ago
Comment by pluc 3 days ago
Comment by ghtjason 4 days ago
Comment by vee-kay 3 days ago
Comment by jstrieb 3 days ago
https://github.com/jstrieb/hackernews-button
My project is somewhat different from the userscript in that mine uses Bloom filters to check whether a link has been submitted, whereas this userscript sends every page you visit to the Algolia search API. Using Bloom filters means that there are no external requests unless you actually press the button. My project also doesn't show the comments in a sidebar.
Having a link to past discussions, whether using this userscript or my extension, is useful not only to read the comments for a page you're browsing, but also to find good sites that haven't been submitted yet!
Comment by jeremyjh 3 days ago
Comment by avadodin 3 days ago
Comment by danbruc 3 days ago
Comment by avadodin 3 days ago
How does the filter know anyways?
If it is provided by the package, one could imagine adversarial scenarios where "high interest" submissions are excluded from the filter(maybe even make a custom one each time that somehow lands them in a collision) so Algolia knows exactly what it wants to know about you.
Probably, I should have read more into both of the projects before asking.
Comment by avadodin 2 days ago
The malicious filter would have to conspicuously avoid tracking the URLs of interest.
Comment by cyanregiment 11 hours ago
I know it could be just Chrome extensions but why not a whole new browser that also enforces the “bookish” aesthetic by default and is designed around reading articles.
Feel like if you did wrap Chromium and got HN users using it, the Extensions would be a lot more active and exciting as many Show HNs could be one
Comment by 8ig8 3 days ago
Comment by s4i 3 days ago
Comment by joshdavham 4 days ago
Would you be interested in making one?
Comment by twalichiewicz 4 days ago
Comment by neom 3 days ago
Comment by joshdavham 3 days ago
Comment by djfdat 4 days ago
What I do now is open the HN comments, and then when I'm ready to look at the link + comments, right-click on the title and Open in Split View.
Comment by kwar13 3 days ago
https://chromewebstore.google.com/detail/hacker-news-saved-y...
Comment by abudooboo 3 days ago
Comment by twalichiewicz 3 days ago
Comment by kwar13 3 days ago
https://chromewebstore.google.com/detail/hacker-news-saved-y...
Comment by ML0037 3 days ago
Just for your information, when I open "https://claude.ai/new" the script automatically open a random article, do you know why?
Comment by twalichiewicz 3 days ago
Comment by txhwind 3 days ago
It seems the software productivity has exploded in the agent era. However, do we treat every point of daily experience seriously enough? Do we recognize such pains actively and try to eliminate them (often easy), or just tolerate infinitely?
Comment by est 3 days ago
Comment by parpfish 3 days ago
Instead of browsing across sites, you’d be browsing across communities seeing the same site.
Comment by twalichiewicz 2 days ago
Comment by jedberg 3 days ago
Disqus existed, but it worked because every page was completely independent. The discussion only existed embedded on the page.
Comment by geuis 3 days ago
My use case, even on phone:
View HN
Right click link to open in new tab OR: tap/hold a link then open I a new window.
What problem is this solving?
Comment by monkpit 3 days ago
Comment by h2aichat 3 days ago
Comment by jpl56 2 days ago
I miss the Firefox extension someone wrote a while ago (like ~2012), it was called HnMarkAllRead
1) it marked as read all topics on a page by clicking a button, even the ones I didn't visit yet and
2) it had this option to not display a topic already read on a previous session when displaying the next page
A new Firefox version killed it unfortunately.
Comment by latchkey 3 days ago
currently rocking 666 users... https://oj-hn.com
Comment by trash_cat 3 days ago
Comment by dewey 3 days ago
Also much easier to glance over what a user script is doing vs. unpacking some extension and then finding the actual business logic in all the wrapper code.
Comment by Natalia724 3 days ago
Comment by perpil 3 days ago
Comment by twalichiewicz 3 days ago
I've updated to v1.4.5 which now allows you to drag the toggle button anywhere you want on screen, and added the collapsed-by-default behavior on mobile.
Comment by e-Minguez 3 days ago
Comment by franciscop 3 days ago
https://news.ycombinator.com/item?id=12898366
Note: I took it down when it seemed it could degrade HN quality if people used it as normal comments, but yours is great since it's the opposite target/usage
Comment by LoveMortuus 3 days ago
Comment by twalichiewicz 2 days ago
Comment by cbhl 3 days ago
That said, in case it helps anyone else, my usual flow is to middle-click (by clicking my mouse wheel) both the link and the comments link which opens each in a new background tab (at least in Chrome). Hopefully that's lower-friction than what you were doing with the two tabs.
Comment by james2doyle 4 days ago
Comment by powvans 4 days ago
Comment by locusofself 3 days ago
Comment by consumer451 3 days ago
Comment by asadm 3 days ago
Comment by hdjdjdjrj 3 days ago
Comment by anp2987 3 days ago
Comment by Topology1 4 days ago
Comment by PKop 2 days ago
Comment by gorgoiler 3 days ago
In the excludes, did you mean *.bank.com, or *bank.com?
Or maybe even *bank*.*!
Comment by twalichiewicz 2 days ago
Comment by Asmod4n 3 days ago
Comment by prtmnth 4 days ago
Comment by jason1cho 3 days ago
The uploads to greasy fork seem reduced these days.
Comment by pseudosavant 3 days ago
Comment by hugopuybareau 4 days ago
Comment by twalichiewicz 4 days ago
I normalize the URL and use HN's Algolia search API to find an existing story with a matching URL. I don't currently handle multiple HN submissions of the same article; I just use the matching story I find.
That being said, I could see creating a historical snapshot of all the times an article has been submitted and building a blended comments section in the future.
Comment by Barbing 4 days ago
Comment by twalichiewicz 3 days ago
https://github.com/twalichiewicz/HNewhere/releases/tag/v1.4....
You can test with https://www.apple.com/iphone/
Comment by sn9 3 days ago
Comment by Razengan 3 days ago
Comment by ahachete 4 days ago
This shouldn't be a script (no offense, great job!). It should be built into the browsers!
Comment by kwar13 3 days ago
https://chromewebstore.google.com/detail/hacker-news-saved-y...
Comment by ninalanyon 3 days ago
Comment by twalichiewicz 2 days ago
Comment by thelastgallon 3 days ago
Comment by trash_cat 3 days ago
Comment by FWxqQ 3 days ago
https://github.com/rzagreb/hackernews-top-rss
This is actually how I found this article as well
Comment by blopp99 4 days ago
Comment by kalamarico 4 days ago
Comment by Ostatnigrosh 3 days ago
Comment by zouhair 3 days ago
Comment by twalichiewicz 3 days ago
I'm working on a fix, but in the meantime you can add `@exclude https://chatgpt.com/*` to the userscript header.
EDIT: Added this to the v1.4.0 release just now.
Comment by mohamedsayhii 3 days ago
Comment by f3408fh 4 days ago
Comment by frollogaston 4 days ago
Comment by SnipeOfficial 3 days ago
Comment by wayknow 3 days ago
Comment by skyhigh2026 3 days ago
Comment by vee-kay 3 days ago
Comment by appsbymo 3 days ago
Comment by croisillon 3 days ago
classic beginner error, in fact no one is supposed to click on TFA
Comment by SCLeo 3 days ago
Comment by rf15 3 days ago
1. open the comments page
2. select the comment box
3. judge the linked content by its HN title alone and get ready to post
/s
Comment by yoyopa 3 days ago