Back to News
Advertisement
ttwalichiewicz about 14 hours ago 98 commentsRead Article on github.com

ES version is available. Content is displayed in original English for accuracy.

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.

Advertisement

⚡ Community Insights

Discussion Sentiment

78% Positive

Analyzed from 3036 words in the discussion.

Trending Topics

#tabs#open#comments#com#extension#https#split#link#chrome#tab

Discussion (98 Comments)Read Original on HackerNews

kccqzyabout 10 hours ago
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.

ksec25 minutes ago
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.

ta8903about 7 hours ago
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.
jiehongabout 6 hours ago
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.

yoz-y37 minutes ago
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

TeMPOraLabout 3 hours ago
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.

jbstackabout 4 hours ago
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.

ta8903about 3 hours ago
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.

dvdkonabout 4 hours ago
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.

perpilabout 13 hours ago
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.

swyxabout 13 hours ago
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.
noncovalenceabout 12 hours ago
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.
bstsbabout 2 hours ago
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
twalichiewiczabout 13 hours ago
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.

perpilabout 13 hours ago
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.
moritzwarhierabout 13 hours ago
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.

grimgrinabout 13 hours ago
I love userscripts. Aren't we all using https://github.com/violentmonkey/violentmonkey now though?

thought I realize "if it works it works", https://github.com/Tampermonkey/tampermonkey

ta8903about 7 hours ago
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).

jstriebabout 5 hours ago
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!

jeremyjhabout 1 hour ago
I like the bloom filter idea - I agree I don't want every URL I visit to be sent to Algolia. I really like this project's UI though - automatically opening it in a pane so I don't have to leave the site to see comments is really nice.
avadodinabout 2 hours ago
I don't understand what the Bloom filter is supposed to achieve here. Can you elaborate?
danbrucabout 2 hours ago
Not the author, but this prevents leaking all URLs you are visiting to agolia. Instead of asking Was this URL submitted to Hacker News? you ask Which URLs have been submitted to Hecker News?, store that in a Bloom filter, and then use the Bloom filter to answer the question Was this URL [likely] submitted to Hacker News?
plucabout 13 hours ago
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.
wccrawfordabout 1 hour ago
In Chrome, I just right-clicked the link above and hit "open in split view" and it did.

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.

dagurpabout 13 hours ago
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.
vdfsabout 3 hours ago
Edge also had, and now even Chrome have it.

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

Barbingabout 13 hours ago
I accidentally closed Firefox’s last “you’ve just updated” screen which probably mentioned Split View. Couldn’t re-open it. It’s not this https://www.firefox.com/en-US/firefox/153.0.1/releasenotes/ , know if it’s mirrored?
squigzabout 12 hours ago
werdnapkabout 11 hours ago
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.

devsdaabout 9 hours ago
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.

monkpitabout 9 hours ago
Left click?
HelloUsernameabout 4 hours ago
Maybe they have their mouse in their left hand and reversed main and secondary button?
pluc43 minutes ago
Nope, just said left when I meant right for some reason
ghtjasonabout 12 hours ago
alt/option-clicking on the desired tab works too
abudoobooabout 10 hours ago
Have you considered modifying it to trigger on every HNews click as well as with as manually triggered? As it is now it leaks browser URLs + query string + fragments to hn.algolia.com since it queries it on every single page you visit. At the very least it might be good to sanitize the queries by restricting to origin + path?
twalichiewiczabout 9 hours ago
8ig8about 8 hours ago
I just open the HN post and then open the article. That way I can simply go back to the comments after reading the article, whenever that may be.
s4iabout 2 hours ago
This. I gather interesting posts this way in my browser tabs in the phone and everytime I finish reading something I click "Back" and there's usually a discussion there, unless I opened the link originally from somewhere else than HN.
e-Minguezabout 2 hours ago
Can the links be opened in pairs using the split view feature? like create a split view, open the article on the left hand side and the comments on the right hand side.
kwar13about 10 hours ago
I made an extension that opens both tabs for you and thus far has a whopping 6 users!

https://chromewebstore.google.com/detail/hacker-news-saved-y...

trash_catabout 4 hours ago
Wouldn't it make sense to have it an extension? Just spontainously (without reading any instructions) I don't understand how to use this or what Userscripts Tamper or Violentmonkey is.
deweyabout 4 hours ago
I prefer user scripts as I have to install one extension that can load many plugins (user scripts) instead of having one extension for every tiny website tweak.

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.

djfdatabout 13 hours ago
This is great and is also something that I've always had an issue with.

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.

kwar13about 10 hours ago
I made an extension that does exactly this a while ago

https://chromewebstore.google.com/detail/hacker-news-saved-y...

Asmod4nabout 2 hours ago
Just curious, can’t this be done using a bookmarklet? Albeit it being a bit clunky to use compared to a userscript which runs automatically.
Advertisement
estabout 7 hours ago
This is how reddit supposed to be. A universal comment box for del.icio.us
parpfishabout 7 hours ago
I’d love if there were different “layers” of meta discussion on top of everything on the web. Every blog and website would have an untold number of communities having discussions that are completely optional for you to view.

Instead of browsing across sites, you’d be browsing across communities seeing the same site.

jedbergabout 6 hours ago
Fun story. Way back in 2008, I tried to make it exactly that. I worked on figuring a way to inject the reddit comments onto any page. Sadly at the time the JS ecosystem just wasn't mature enough to allow users to log into reddit and safely inject it onto the page.

Disqus existed, but it worked because every page was completely independent. The discussion only existed embedded on the page.

geuisabout 9 hours ago
I don't understand the problem space. Meaning I don't understand what this solves.

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?

h2aichat21 minutes ago
I find it useful. It saves me time and you can read both things at the same time, right?
monkpitabout 9 hours ago
Or, open the comments and then click the title link. Then click back when you’re done reading the article, so you can read the comments. That’s my preferred mobile workflow anyways.
joshdavhamabout 13 hours ago
I think the amount of upvotes you’re getting here suggests that it might be worth building a proper browser extension for this!

Would you be interested in making one?

twalichiewiczabout 12 hours ago
Open to it. For now I’m going to keep it as a userscript and build out some of the interesting ideas people have suggested here. If it keeps growing, a proper extension would definitely make sense.
neomabout 12 hours ago
Rather than making hn extension, maybe you could contribute to https://oj-hn.com/ / https://github.com/OrangeJuiceExtension/OrangeJuice I use it and find it to be great, would love to see this in it! :)
joshdavhamabout 10 hours ago
Makes sense. You can also iterate faster without the hassle of getting your extension approved on the chrome store, etc.
txhwindabout 12 hours ago
I also wrote a Monkey script to save clicks when reading papers: just embed PDF webview into the Arxiv abstract page. https://github.com/OneMoreSecond/FileSave/blob/master/arxiv_...

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?

gorgoilerabout 3 hours ago
The thing I like most about your post is it has prompted me to read an example of a user script. Thanks!

In the excludes, did you mean *.bank.com, or *bank.com?

Or maybe even *bank*.*!

jason1choabout 3 hours ago
I'm a fan of user script, glad to see people are also developing new ones.

The uploads to greasy fork seem reduced these days.

Natalia724about 10 hours ago
The mobile default seems important here: opening the panel collapsed, then preserving its size per site, could keep the first article read predictable while retaining quick access to the discussion.
perpilabout 9 hours ago
I modified the script to start collapsed. Code is in this issue if you would like to try it: https://github.com/twalichiewicz/HNewhere/issues/5
twalichiewiczabout 7 hours ago
(Replying to both of you)

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.

cbhlabout 8 hours ago
This is cool. Don't want to minimize that.

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.

franciscopabout 11 hours ago
I made something slightly similar ~10 years ago where you could embed HN comments in your own site. It was the opposite end of consumer though, for webdevs to embed it.

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

locusofselfabout 10 hours ago
Is it lame that (especially for super long discussions), I often open a gemini tab and summarize the comments? I like reading HN comment threads, but I often only have a few minutes and just want to get the gist of the reactions from the community for some topic.
consumer451about 10 hours ago
yes, a bit.
asadmabout 10 hours ago
Probably better than rushing the top comment only.
Advertisement
ninalanyonabout 4 hours ago
In the side bar I can't vote on the comments.
james2doyleabout 12 hours ago
Nice. I’ve been using the new split tabs in Chrome. Works perfectly. I believe Firefox had this first?
powvansabout 12 hours ago
The submission is cool because it opens the comments even if you just happen upon some article that also happens to have a HN discussion. That said, when I read the headline I thought the same thing, “uh, right click, open in split view?” When that feature landed in Chrome my first use case was exactly this.
Topology1about 13 hours ago
Phew, thought I was the only one doing that. I thought I was missing some core site feature lol.
pseudosavantabout 10 hours ago
This is pretty cool! It had never crossed my mind that everyone else is doing the same two tab thing that I'm doing.
prtmnthabout 13 hours ago
Haha, this is so cool and can't believe I didn't think about it. I've been opening 2 tabs per HN link on my phone since forever!
hugopuybareauabout 13 hours ago
Nice idea ! How do you handle duplicates ?
twalichiewiczabout 13 hours ago
[Assuming you mean duplicate HN submissions]

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.

Barbingabout 13 hours ago
Blended comments section sounds great! Good work.
twalichiewiczabout 10 hours ago
Crunched a bit and got a first pass of this working.

https://github.com/twalichiewicz/HNewhere/releases/tag/v1.4....

You can test with https://www.apple.com/iphone/

mohamedsayhiiabout 3 hours ago
love it
FWxqQabout 4 hours ago
I used another approach - created a custom RSS that has both links, plus the content of the top comment in the same item. There are also a few other filters like selecting only posts that have at least 50 points. Github actions handles RSS updates every five hours, making feed generation completely free.

https://github.com/rzagreb/hackernews-top-rss

This is actually how I found this article as well

ahacheteabout 13 hours ago
I feel ya. I'm always middle clicking twice, story and comments.

This shouldn't be a script (no offense, great job!). It should be built into the browsers!

kwar13about 10 hours ago
thelastgallonabout 9 hours ago
Chrome has add tab to split view.
trash_catabout 4 hours ago
So I have to Shift + Alt + n, the search for the HN blog / article in the other tab? If you have a lot of tabs this isn't feasable.
Advertisement
Razenganabout 2 hours ago
I've made ChatGPT Atlas as my AI-only browser. Whenever there's an HN post about something interesting but not THAT interesting to manually sift through 100+ comments on it, I just ask it to summarize it for me :')
latchkeyabout 9 hours ago
For orange juice, on a "selected" story, i made left arrow open the comments and right arrow open the story. bang bang.

currently rocking 666 users... https://oj-hn.com

blopp99about 13 hours ago
Thought I was the only one hahaha
zouhairabout 11 hours ago
hehe, I opened chatgpt and the little button blocks the three dots
twalichiewiczabout 11 hours ago
Yeah, I noticed that too. It's mostly because people tend to post ChatGPT outage pages to HN, so the script ends up activating there unfortunately.

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.

kalamaricoabout 13 hours ago
Very cool!
f3408fhabout 13 hours ago
Now make a user script that blocks posts titled "I was tired of X, so I...".
frollogastonabout 12 hours ago
Instructions were unclear, rewrote this script in Rust then in Zig
croisillonabout 2 hours ago
> I was tired of opening 2 tabs for every HN link

classic beginner error, in fact no one is supposed to click on TFA

SCLeoabout 5 hours ago
Oh, I solved this long time ago by only opening the discussion page, never read tfa, and pretend I did. /s
rf15about 3 hours ago
See, you can do this a lot easier, and a lot of HN folks have already figured out this simple trick:

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