308 points · by sjdz · 4y ago · 198 comments
I made this free browser extension that modernizes the Hacker News design.
I previously launched Modern for Wikipedia [1] here back in December, and it seemed like the obvious next choice to build one for HN too! So I've taken what I learned from building that, and have spent all my spare time this year building Modern for HN.
I realize this won't be for everyone, but it was a fun project to work on, and I'm really happy with the result so far. Hope you like it too!
Lots more planned for future updates, and suggestions welcome :)
But this is the good thing about it, people can extend it as they wish.
> that way I don't have to bloat the browser's start-up time and don't have to "worry" about this extension spying on other websites, even though I realize it's unlikely
No need to worry about that, as it's limited by the permissions specified in the extension manifiest. So this extension can only access news.ycombinator.com and extensionpay.com to facilitate the Pro upgrade.
Well consider that when you go to a proxied version of HN, you're essentially giving an opaque server "permission" to view all your traffic it sends to HackerNews... but you can't verify what it's doing with that
At least this extension states exactly what permissions it needs, and I can inspect it and see what it's doing...
There used to be (and still are) things like https://mreidsma.github.io/bookmarklets/jquerify.html which allow to inject JavaScript on click (and thus would make it possible to transform that site), but I gave it a shot and HN is set up to disallow this:
Refused to load the script 'https://code.jquery.com/jquery.min.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://cdnjs.cloudflare.com/". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.That's about my only complaint.
Oh, and way bigger links for my big thumbs
On desktop, HN is the only website that I have "zoomed". 120%, btw.
So often a zoom will break complicated UI layouts and their JS interactions, so I appreciate the simplicity of this site allowing my user agent to customise my experience and still have it work.
You would think that but no. The HTML is so full of tables everywhere that it's not that easy to do anything creative with it. I'm pretty sure that's why some features such as collapsing comments took so long to be implemented (and not because "not collapsing forces you to read")
Just tried 100% out of curiosity and you're right, it's ridiculous.
But I guess to each their own. +1 for loving simplicity of current design though.
Only at that zoom level would the page span the entire width of the screen and wrap the text around.
Firefox on iPhone/iOS can't zoom text (a long time open request.) Therefor it's impossible to this website with it. Kind of ridiculous.
Is it really so hard to create a proper default layout? Text size seems so basic...
This is how markdown works, so it feels natural to me (although then the differences from markdown become apparent...)
Anyone else see the mock-up and think “this looks slow”?
Logically, it’s not a defensible inference in the slightest. There’s nothing about this design that would necessitate performance tradeoffs. But that’s the barely-conscious, emotional first impression I had.
I wonder if there’s something about “modern” design (or a specific subset thereof) that correlates with subpar performance.
Related story: In my free time I am a coach for a competitive math team, I recently had to design an application to automate multiple choice problem submissions. Nothing stellar, your run-of-the-mill CRUD app. But it was under some interesting engineering constraints: users would have to log in from a variety of devices, phones, tablets, bad chromebooks, etc., possibly on slow cellular connections.
So naturally I went for a simple server-rendered design, with stock Bootstrap hosted on a CDN.
The overwhemling reaction was "this is so fast". Now, being server-rendered with absolutely no XHR, the app spends most of the time doing nothing, but it's interesting laymen think it's fast.
I think we came to associate "modern" designs with piles of javascript, requests everywhere, popups, ads, and the like.
Probably the correlation is indeed there, even if it's obviously not causation.
It is faster than basically any modern CRM in existence.
30+ companies use it daily. It runs in a namecheap shared hosting for $4 a month.
It just looks clumsy and distracting compared to plain HN, IMHO. It highlights elements like usernames, the total amount of comments(!) or the upvote/favorite actions, that users will only rarely interact with or even want to look for. Meanwhile other actions have to be hidden beneath a "…" widget, lest the page become too cluttered. The factory HN look does a much better job of bringing the comment text into focus and reflects the threading hierarchy without needing a lot of padding to space things out.
The design is clean, modern, minimalist -- and I associate sites that look like that with loading in a blink.
It's the sites where everything is crammed in and packed with ads that load slowly, like most news sites.
Everything about this style of design says "fast" to me.
We have different views of "defensible". I imagine clicking something on that page and waiting for a response. I learned to make that association based on experience.
I was also pleasantly surprised at the speed and snappiness. It must of taken some restraint to keep it so fast
But this is really well designed and great to have the style customization available.
Are you a designer?
The upvote, bookmark buttons etc probably need a tooltip - not everyone might know what those icon buttons do. In fact I'd add a tooltip to all icons buttons.
Also, when the width is set to 100% - the menu that appears after clicking on the more button (3 dots) is cut off - as it appears to the right. You probably have to do some edge detection or always show it to the left.
And nice one for trying to earn a buck.
I _hate_ modern web UIs however. Give me plain old websites that are information dense, with none of the fluff. HN and old.reddit.com are my daily reads.
I will be _very very_ sad when old.reddit goes away and I probably will have to go app only (Apollo) when that happens.
In particular I ask this because your approach -if generally applied- means installing an extension for each single site, which feels a bit too much.
On Chrome/Edge you can, not sure about Firefox.
Additionally this extension only even asks for permission to access Hacker News and some backend stuff presumably used for the paid tier.
Just a subjective thing -- I would consider offering Verdana in a future release, for those (like me) who aren't yet ready to lose that flavor of HN. But all the other adjustments are very desirable to me so far.
Regarding the name: The horse might be out of the barn, but calling this a "modern" HN sounds a bit too much like a value judgment to me, though I doubt you meant it that way (and I doubt anyone at HN really took offense). It also triggers all the curmudgeons who are hellbent against anything "modern" just because it's modern.
Great job!
I'd like to eventually add a full theme editor to change all aspects of the UI.
I used to use HN-Special[1] (by the same dev who made that 2048 game[2]) but I stopped a while ago and I don't miss it. I like HN as is (for now), but I do have it at 150% zoom using the native browser built in zoom, which works great for my needs.
The one thing I really really want is the equivalent of the "[l+c]" button from Reddit Enhanced Suite. In one click you open both the comments and the submission (if it's just a text one) in new tabs.
It's a neat idea to implement it as an extension. And I enjoy how it just overlays the normal site (loads separate pages as separate pages, etc)
And finally a dark mode. Dear god.
One bit of feedback: it took me a minute or two to figure out how to comment on an article (to write this very comment); I actually had to look back at the website to make sure commenting wasn't a "Pro" feature. I don't know if the reply-arrow really translates to comment threads, especially when you're not "replying" to another comment but to the main post. Some sort of comment-bubble icon might be clearer. At the very least I think those icons could use titles, and/or "modern" tooltips.
Overall pretty cool! I think I'll try it out at least for a little bit
Edit: A couple other things,
- It's a bummer that karma and threads (now "Comments") are hidden behind an extra click. When I'm actively participating in a thread those are two of my most frequently-used parts of the UI
- The thread UI is a little too minimalist I think; it's a little hard to visually parse where one comment ends and another starts, nesting levels, etc. Some tasteful borders or lines would go a long way here, though so would some slightly-more-contrasted colors
- I don't see a way to see upvotes on your own comments like in the main UI. My dopamine receptors would like that feature back ;)
- Will definitely add tooltips and have a think about how to make the reply process clearer.
- I'd like to make the top nav customizable at some point, so when I do I'll add options for the account sections (threads etc). Will add a setting to show karma next to the user icon too.
- Yeah a couple of others have requested that too. The next logical step is a theme editor, which would allow changing border colors etc. It's on the TODO :)
- Yes that should be there, will add it back in the next update.
One thing: it'd be nice to click the whole top header of the comments to collapse them, instead of clicking the far left toggle.
Edit: also not seeing my comment score inline on the page header makes it difficult to know if I should check my comments for activity. this one might be a deal breaker.
One deal-breaker for me, sadly -- having the collapse/expand and upvote/downvote buttons on opposite sides (left, right) of the page is way too annoying.
When I read comments, I'm constantly voting and collapsing. Using my trackpad to jump back and forth is just too much.
Current HN isn't great for that, but it's usually only traversing about a quarter of the page's distance.
The other alternative might be to add a setting to move the collapse/expand arrow to be part of the icons on the right.
I find any functionality pushed all the way to the right side to be harder to use, simply because it's not "together" with everything else on the left. Your eye has to do more work to match right-side content to left-side across a whitespace.
great design, Im keeping it enabled for testing
I've been thinking about creating this + adding https://github.com/mozilla/readability to grab the links that are text articles and present them in-page (and cleaned up, just the text+images+similar, removing all the sidebars, popups, etc) instead of having to go to a 3rd party website with all the popups and such.
It'd have to be either a personal website or a browser extension like yours, since I wouldn't be able to host a given article for anyone to read (for copyright reasons), but I can have a modified browser that loads a 3rd party article different.
Maybe there's a better way someone knows for extensions to grab remote html without running into these problems?
The alternative would be for the extension to grab the html via API from a crawler running on a server (or SaaS), which should work pretty well.
> The alternative would be for the extension to grab the html via API from a crawler running on a server
Oh like 'https://myplainwebsite.com/parse?url=https://example.com/doc...'
You can parse any URL into markdown with `https://content-parser.com/markdown?url={encodeURIComponent(...}`.
HN is great because it /isn’t/ … that.
Only feedback I have right now (that I haven't seen anyone else mention) is that I'm finding it hard to jump to the next "top-level" comment. If I'm half way down a comment thread and decide I just want to skip the rest of this thread, I'm used to just scrolling down a bit until I see the next top-level comment and I'll read from there. It's easy enough to do in non-skinned HN because the everything is left-aligned, but with the extension I haven't been able to intuit a left 'border' yet and am not sure if it'll ever come to me.
Some things I noticed: changes to the font size/width/line height don't seem to persist between the comments page and the front page. On top of this, the bars don't have clear numerical values so it's hard if you make any tweaks on them to match the settings across pages. ALSO I got kind of out of hand with those settings (line height in particular) and wanted to return to the default, but there's no reset button as far as I can tell.
The theme settings (font size/width/line height) apply to the current view. So you can setup the style separately for each of the 3 views: story pages + index pages (list or table view).
I'll add all this info to the help section shortly.
Will also add tooltips to the sliders (with current value) in the next update + a reset button :)
Thanks! great job!
Also no heavy frameworks used, just basic hand-coded JS + jquery + a few helper libraries (luxon for dates etc)
I also don't like having to hover to see the icons for reply. Why are you hiding the parent/context buttons for navigation in a dot-dot-dot menu when you drill into a comment chain? Where's prev/next? Upvote/Downvote/hover UI covers stuff, and no alt tags anywhere to be seen.
Also why does it need perms to firebase and extensionpay again?
It just feels clunky even as a redesign.
- Parent / context are in the menu just to keep the design clean. But I understand that's not what everyone wants, so I will add a setting to show these with the other icons, instead of in the menu.
- Prev / next are moved to the "control pad" (pro feature), but my intention is for the free version to support all current HN features, so I will add those back in the next update.
- The permission to firebase is to access the HN API [1] to grab user profile info etc. The other is for the pro upgrade using ExtPay [2]
My one piece of feedback is this: the line height adjustment on the comment pages changes the distance between comments as well as the space between lines within comments, but I think those are better decoupled. I would like to see comments fairly close together while maintaining a readable line height for the comments themselves.
For reference, in the Pro version you can set the storage for your favorites to private (local browser storage) or public (HN profile). It's currently set to private storage for free users, but should be set to public (to save to your HN profile).
I like the modern UI for Wikipedia too, it would be great if you can make it work on Wiktionary.org too!
A note, the wikipedia extension doesn't work on non-engoish versions of Wikipedia, for example de or ar.Wikipedia.org
Unfortunately it doesn't seem to be open source, a big nono with browser extensions
It would be great if you can show the fav icon of the link beside the titles, it helps differentiate posts.
It adds dark mode and some spacing/font size/readability improvements for wider screens.
One tweak I hope HN will roll into its own UI: if "HN Can't Process Your Requests This Quickly", then offer a "window.reload()" link. Comes up when I'm opening a bunch of bookmarks at once and maybe there's three or four HN links that open. Same thing as hitting refresh, just a added convenient step.
Please consider adding some kind of comment's depth indicator. My most frequent action on long threads is "stop reading the rest and move to next top-level comment". If previous top level comment is beyond top of the screen - I just scroll down looking for minimal indent. With your centered design it is impossible. A thin line by the left side of text column wuld be enough, or you may go further and add some dots or pictograms on the left of each comment. Just a suggestion.
I quite like this extension! One minor criticism though that prevents me from using it: links I've clicked through to from the front page don't change colour indicating where I've been in the past. This is infinitely useful on a heavy HN browsing day :)
However, I couldn't figure out how to comment initially and looked for the comment box, even at the bottom and couldn't find it. I finally realized it is the left facing arrow on the right just under the title. I think that UX could be improved to surface the comment feature.
Also, one feature I really wanted that I don't see on the extension is the ability to "favorite" it without clicking into it. So, I'd love to see that added. I will consider paying for the pro version to support you, but am going to give it a week or so on the free version.
Thanks
I just want all comments to load on page load so I can search easily.
I agree that it's annoying and it will be a happy day when we can turn it off properly.
It has some features like, if I select a part of a comment and hit reply, it will reply quoting that part
edit: oh, you're charging for it
anyway, my feedback is: there's a slow loading time whenever I open a link and I don't understand this
Also curious if there's any flaw in the official HN web app you see that incentives you to make this.
- It builds on the existing site, so the new design is always applied to HN urls. No need to visit a separate website.
- Privacy - everything is stored locally in your browser, there's no 3rd party website to track your activity etc. Also with JSON backup you're in full control of your data.
- Unlimited storage - local browser storage has limits, but extensions can request unlimited storage. This is useful for the history and bookmark features.
Good job honestly, it really modernizes an old site without doing stupid sh*t
Can you add the "past" section too? Also, it would be great if you add left margin indicator for comment threads, otherwise for long comment threads it is not clear how deep inside I am in the thread.
Thanks for your work!
The screenshots look nice on mobile though. Good effort but I'm kind of attacked to HN how it is and I hope they never change it (and that they continue to make it east for people to riff on the original).
Having a dark version of this would be awesome :) Thanks for your hard work. I appreciate it! :)
I especially like that I can make the site look incredibly nondescript and hide my username, so that it's less obvious at work when I have my pinned HN tab tucked away.
EDIT: I would expect a comment block to be before the "${count} Comments" tag.
Great job. Already using and enjoying this. Keep up the great work.
What for ?????????
Seriously : I can't understand... and I surely WONT install this because I cant ANY REASON. Really disapointed :-(
> This extension is not trusted by Enhanced Safe Browsing. Learn more[1]
[1]: https://support.google.com/chrome_webstore/answer/2664769?vi...
> For new developers, it will take at least a few months of respecting these conditions to qualify.
Modern for Wikipedia [2] already meets those standards, and has the relevant badges, so I guess it'll just take some time for those to be approved and for the "Enhanced Safe Browsing" warning to be removed.
[1] https://developer.chrome.com/docs/webstore/discovery/#publis...
[2] https://chrome.google.com/webstore/detail/modern-for-wikiped...