Lurker News
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 (126) 63 threads

kccqzy4 replies#
Feature 2 is really useful. When I land on a technical article I know chances are there will be a nice HN discussion, that may sometimes even refute the main point of the article.

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.

ta89033 replies#
Not sure if I agree about using windows instead of tabs. I have hundreds of tabs open, and dozens loaded, at any moment. I'm sure that it's possible to manage all the context with separate windows via a window manager, but it would have to be a REALLY good window manager to be able to provide equivalent features of tree style tabs and separate panes and whatever else that something like Sidebery provides, and it is always easier for each application developer to implement tabs suitable for that application's requirements.
jiehong3 replies#
I think one of the point of the author is making might also be that a window manager could do just more, like managing windows as tabs as well.

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.

TeMPOraL2 replies#
Windows (IE) tried to give WM visibility into tabs long ago, but this quickly revealed a problem: if tabs are now also separate windows, they enter the Alt+Tab ring, and suddenly you're Alt+Tabbing between 5 applications and dozens of open tabs. N=1, as a tab hoader, I absolutely hated it (it also made Alt+Tab itself very slow to show and cycle).

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.

Continue this thread — 2 replies

yoz-y#
Ideally the manager would have windows and containers. Containers can be nested and can be floating windows, splits and tabs. There is no reason why tabs inside a window should belong to one application.

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

vladvasiliu#
> 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.

Not only that, but you could actually mix "tabs" from separate applications!

dvdkon#
I use Sway and happily manage my terminal windows using its tabs and splits. I can mix other "graphical" apps with the terminals or move them to another screen, all with the same keybindings. I agree, though, that I wouldn't want to replace my Sidebery vertical tabs with this setup, but I ultimately don't see why equivalent functionality couldn't be implemented inside the window manager in some alternate universe.

There are sadly hardly any WMs now with tabs, so having them support tree style tabs as well doesn't look too realistic.

jbstack1 reply#
Do you really need hundreds of open tabs though? To me this suggests a workflow issue rather than a tab management problem.

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.

ta89031 reply#
I don't know, it works for me.

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.

Continue this thread — 1 reply

ksec#
Agree 100%

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.

vladvasiliu2 replies#
> Sadly the community prefers to solve this at the application level rather than the desktop level

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.

pastage1 reply#
Do you not think there are ways to organize tabs that should be applications specific?
vladvasiliu#
I think there are, see the other comment about tree-style tabs or similar for Firefox. I can absolutely see the value in that and I don't argue for that option to be removed or otherwise degraded.

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.

nektro#
yes! so frustrating
perpil1 reply#
This is slick. 2 things.

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.

swyx4 replies#
is this better than using a chrome extension? i guess people need to have tampermonkey installed and so thats a slightly higher barrier to entry? i wonder if chrome would be interested in "sherlocking" userscripts so that we can distribute non security nightmare code easier.
perpil3 replies#
Tampermonkey isn't better than using a Chrome extension, but it's less friction for a developer to build and distribute a cross browser script. If they build it as an extension, they need to target multiple browsers and get it deployed to the Firefox/Chrome web store.

Continue this thread — 2 replies

moritzwarhier#
If you can read JS and the user script is not huge, I think it makes a huge difference.

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.

ta8903#
Userscripts are also less friction for the user. At least for some level of triviality.

I would say only go for extensions over userscript if you need a settings menu (or any of the APIs the sibling comment mentions).

twalichiewicz#
Mostly transparency. Since this runs across pages you visit (with the sites controlled by the @include/@exclude rules at the top of the script), I like that the entire source is right there and easy to inspect before installing it.

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.

noncovalence1 reply#
In addition to the advantage of explicitly specified capabilities mentioned by others, I'd say a userscript is also much more durable and low-maintenance than a Chrome extension. This is coming from someone who's written an extension for personal use before, and had to jump through a million hoops with Chrome Dev just to give the browser permission to run my own code that I wrote myself, and that's to say nothing of the whole mess with manifest v3 as well. Throughout the entire time I've been able to happily keep using userscripts written by myself or others with 0 maintenance required.
bstsb1 reply#
for me on chrome (stable), all that’s needed to install my own extensions is enable Developer Mode in chrome://extensions, then load an unpacked folder as an extension

Continue this thread — 1 reply

tcfhgj#
tampermonkey scripts works with Firefox - chrome extensions don't
pluc7 replies#
Firefox has a new Split View that's useful for this, but you still have to left click and select open in split view (M) then click the link. You also used to be able on some browsers to craft a link that was href="tab1.html|tab2.html", no idea if that's still a thing or if it was limited to "home page" setting.
dagurp2 replies#
Vivaldi has included split view for years (called tiles). You can also right click a link and choose open in follower tab. This lets all links clicked in one tile open in another tile. I use this regularly on HN.
vdfs#
Edge also had, and now even Chrome have it.

Edge had the open links in the other split, chrome doesn't

Izkata#
Way back Firefox had a Tile Tabs addon that could split tabs to arbitrary depth. "Tile Tabs WE" (WE = WebExtensions) was an attempt to replace the functionality after the Quantum change killed XUL-based addons like the original Tile Tabs, but it works by positioning whole windows.
ghtjason#
alt/option-clicking on the desired tab works too
werdnapk#
Thanks for the tip. Didn't know this was added.

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.

devsda1 reply#
Yeah Firefox split view is useful for this.

If any of those vim extensions support link+split, and allow interaction with splits that would be even better.

monkpit1 reply#
Left click?
HelloUsername1 reply#
Maybe they have their mouse in their left hand and reversed main and secondary button?
pluc#
Nope, just said left when I meant right for some reason

Continue this thread — 1 more reply

jstrieb5 replies#
If you use Firefox (and will pardon me plugging my own project), you might be interested in a version of this I made a while ago as a browser extension:

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!

Continue this thread — 5 replies

Load more comments