Based on the most recent stable release being 2011, I agree. But I found it funny that the article also says "A lot of people think that JScript and JavaScript are different but similar languages. That's not the case. They are just different names for the same language"!
I was going to leave a comment complimenting you on your awesome HN username, but I try not to go off on too many tangents.
However, I notice you have exactly 1337 karma right now. So the combination of hunter2 + 1337 is too irresistible not to mention. :) https://i.imgur.com/PM1T8DM.jpg
(It's strange that http://bash.org/?244321 "only" has ~40k upvotes. I remember upvoting it when I was in high school, and it still seems to be working today, so you'd think a famous bash.org quote would accumulate more than a mildly popular Reddit post worth of upvotes...)
I remember reading http://bash.org/?5273 as a teenager and thinking "What! How could anyone possibly lose a whole computer?" But then I lost a fully-working-responds-to-ping raspberry pi a few years ago too. :)
Even from the day it was made it was never the same language it was however a superset of JavaScript (at the time) having several proprietary extensions to the language.
Nice, I'd really like one to collapse all second-level comments. There's enough 1000+ comment links now that the top comment takes up the entire page and everyone wandering in tends to just respond to that or the children rather than numerous others making valid points.
This is now a feature of hacker news itself, as of a year or two ago (?). No extension required. I think the parent comment wants a feature to collapse all comment threads at the same time, so only the top level comments are visible.
Ah, that’s right. (It’s the [-] link in the comment header.) RFN does have a link at the top of the story page called "toggle all commments," but I guess it’s broken, as it only seems to toggle the first comment. The extension does have a convenient feature, a [collapse root] link on each comment in a thread, so you can collapse the thread from within it, without having to find its origin.
You mentioned that the "toggle all comments" button is broken, could you elaborate a bit more on that, and if possible open a GitHub issue for it? Thanks a lot :D.
Apart from that, with RHN you can navigate through the comments using the "J" and "K" keyboard keys and Press "Enter" on the highlighted comment to toggle it. Hope that helps too, cheers :)
Thanks for the great extension, it makes reading HN more...refined.
Well, I tried the [toggle all comments] button on a couple of stories before posting my comment, and it was only toggling the first comment. But I did more testing for this reply, and now it’s working as advertised. I can’t explain that, but if I every figure out the conditions that prevent it from working, I’ll open an issue.
You've made me realise I do something similar. It's probably a good idea that you're forbidden from downvoting direct replies though, because that's often a temptation.
This is so useful! I've previously resorted to searching the page for the word "minutes" to see the recent comments, but that's been unsatisfying.
I only wish that we didn't have to use third party extensions for loading scripts like this. I can never quite bring myself to trust them with full access to all of my pages. This really should be a part of the browser functionality already.
Not break anything, just option “hidden” under settings. Just as they open the possibility to add HEX value to change the color on HN when you reach enough points on HN
On the other hand, it is kind of weird that a site called "Hacker News" is less hackable than MySpace back in the day. At the very least they could redesign the layout to make it easier for external scripts to deal with.
Given how many people here long for the quirky old days of the web, I say whomever starts a thread should also get to create a custom CSS theme for it.
This is a sweet and simple implementation, however I don't think the title "[...] you haven't read yet" is correct. The code caches every comment ID which exists in the page, even ones outside of the viewport. A more accurate title would be "Display a bell emoji on new HN comments".
- Using the JavaScript Intersection Observer may be an interesting addition, as this would explicitly differentiate comments on the thread which you may not have scrolled down to.
I love one-thing-well items of code instead of large (and thus non-secure) abstractions built upon other abstractions. Big fan of the K.I.S.S principle https://en.wikipedia.org/wiki/KISS_principle
Good point. I never thought of it that way. The modern PC is a marvel. On one hand it's a complex mess, on the other we can write poetry like that JS snippet, and it all works seamlessly (unless you're doing something weird).
I've made userscript that locally stores hashes of titles and comments that stays in viewport for some time period and adds some marker to those displayed for the first time (i.e. guaranteed to be "unread" for the browser profile, provided there was no edit).
It uses IntersectionObserver for "exposition watch" and "crypto.subtle.digest" for SHA-1 hashes - I was pleasantly surprised those native APIs are enough to get this magic working.
It's very POC-ey (absolutely no checks for storage capacity etc) but works quite well for me.
E: Actual markers are just light green right borders on "unread" items that slightly fades out after "exposition timeout". I'm using dark userstyle for HN (https://uso.kkx.one/style/71155 ); in default theme they are probably too light to be visible.
For reddit, this is massively easier to implement, as each comment contains in markup an accurate timestamp.
That way the script only has to store the timestamps on which you visit a comment section, not the comment ids.
Additionally, that way you can select "highlight all comments since visit [...]" with a dropdown from which you can choose out of all recent visits you did.
Sadly, Hacker News does not provide any such metadata in the markup. (Just like the comment formatting is shit, and the markup structure is as well. HN should just copy the nesting markup and formatting 1:1 from reddit, and it'd be massively improved already).
Comment item ids are sequential (unless that’s changed since I last looked). You can perform relative ordering operations using them just like you could dates.
Next to your comment there's a timestamp for when it was posted, with the title "2021-09-15T14:18:16". This is available for all comments as far as I can see. In what way is this inaccurate?
Wouldn't it make more sense to add an "unread" class to the comment and style it with css instead of appending new elements?
I also think it would make sense to store the page load time, and compare to a comment's post time to determine if it's new instead of storing all comment ids.
they are already distinguishable by color without any change. this is about comments although it marks only comments as new it hasn't seen before regardless if you read them or not.
This gave me the idea that I would like that standard everywhere. This convention is just so helpful. Maybe replacing with an outline on more heavily styled links, so as not to break layouts too much.
Is it not the standard everywhere? All my links, on every page, are lighter when visited. I suppose some sites might override this, but I've rarely seen it.
It is standard everywhere unless a site explicitly overrides it.
For example, do a Google search and click one of the links. Now do the same search again. The link you followed last time is now purple instead of blue. On Hacker News the links go a lighter grey.
Yes I know, but a lot of websites override it, I'd just like a unified style everywhere. To be honest I'd like consistent styling in a lot more places and I know of some add-ons that get pretty close but not quite.
Sorry, yeah, so you meant it'd be nice to have a feature/add-on that overrides the link colouring to be the same on every site. Absolutely. We had that once, in those distant days before CSS...
Turns out you can do what the top comment by chhickman is doing without any addon as well. Follow my steps above in "Edit 2", and add this to your CSS file:
@-moz-document domain(news.ycombinator.com) {
a:link {
color: orange !important;
}
/* visited link */
a:visited {
color: green !important;
}
}
HN does not aim to be infinite scroll social media which addicts you and makes you keep checking and re-checking for more obsessively. It is purposefully barebones so that you're not tempted to read every single comment and waste time.
> makes you keep checking and re-checking for more obsessively.
Yet I do this more on HN than any other site since I don't know if someone's responded to me.
Noprocrast was... helpful, I guess, but I found myself racing to make poor quality responses sometimes, or HN was constantly locked out whenever I wanted to take a short break, instead of being able to take the time to respond with a thoughtful answer.
If you are going to post a comment that does nothing more than respond to the previous person, you are doing a disservice by forcing thousands of people to read text that is likely irrelevant or unhelpful to them.
The fact that this site is designed to prevent this behavior is one of its stronger points IMHO
I think you're accusing me a of a lot of personality traits I do not possess. Why am I not allowed to respond to people if I so choose? There isn't a limited amount of allowed responses.
you're allowed to respond to whomever you can. the explicit design goal is to avoid comments that are noise on a web forum, even if they're expected in normal conversation. reply comments like "thanks for the link!" (whether you do that or not) are seen to not add that much value, and so are discouraged
So, I get and appreciate the lack of notifications and distractions on HN.
That said, I'd really like a way to find, distraction free(so in some submenu), reply comments.
The current way seems narcissistic, as I have to go through my whole history to see why may have replied. And even then I have to do math to figure out if I'd seen it or not.
Thanks! I was hoping for something on the site, as I don't really want to be 'notified'. That said, I just plugged in an email I don't check often so that should accomplish it about the same. Never knew this existed - thanks again.
I'm not sure if this is something I am fine to say, but I've never signed an NDA or something so I'll just say: (Moderators, feel free to hide this comment if you would rather not like an influx of alpha testers.)
If you sign up to the alpha-testing HN[0], you get access to the thread feature, which is... (quoted from my forwarded mail)
> New feature: when you visit a thread, the software now highlights
> comments that are new since you last viewed the page. These are
> displayed with an orange (or whatever your topcolor is) bar to the
> left of the new comment. Refreshing the page will reset these.
Very useful, I can't imagine having HN without these indicators any more.
For those who don't want to switch to alpha, I made a bookmarklet that lets you enter an amount of time and highlights comments made within that amount of time (i.e. "15 minutes" ago, etc)
I wrote a userscript that implements exactly that, but with the added benefit of storing every time you visited that page, so you can select between all your visits to that page and see which comments have been added after each visit. https://gist.github.com/justjanne/e61fcc9edb7d3dc60bc1a788d0...
Is there a "diff" type addon for all web pages? That would be so helpful. To be clear, I'd like a diff against stuff that I actually could've read (that's been in the viewport) not simply loaded.
98 comments
[ 2.9 ms ] story [ 160 ms ] threadps im a mechanical engineer
[1] https://en.wikipedia.org/wiki/JScript
However, I notice you have exactly 1337 karma right now. So the combination of hunter2 + 1337 is too irresistible not to mention. :) https://i.imgur.com/PM1T8DM.jpg
(It's strange that http://bash.org/?244321 "only" has ~40k upvotes. I remember upvoting it when I was in high school, and it still seems to be working today, so you'd think a famous bash.org quote would accumulate more than a mildly popular Reddit post worth of upvotes...)
Anyway, have a great week!
http://bash.org/?835030
I remember reading http://bash.org/?5273 as a teenager and thinking "What! How could anyone possibly lose a whole computer?" But then I lost a fully-working-responds-to-ping raspberry pi a few years ago too. :)
Cheers!
Looking at settings and links on the page I don't see any functionality like you describe.
You mentioned that the "toggle all comments" button is broken, could you elaborate a bit more on that, and if possible open a GitHub issue for it? Thanks a lot :D.
Apart from that, with RHN you can navigate through the comments using the "J" and "K" keyboard keys and Press "Enter" on the highlighted comment to toggle it. Hope that helps too, cheers :)
Well, I tried the [toggle all comments] button on a couple of stories before posting my comment, and it was only toggling the first comment. But I did more testing for this reply, and now it’s working as advertised. I can’t explain that, but if I every figure out the conditions that prevent it from working, I’ll open an issue.
HN should copy this feature. The top thread dominates the discussion all too often.
Here's a similar userscript I use: https://greasyfork.org/en/scripts/18066-hn-comment-trees/
I only wish that we didn't have to use third party extensions for loading scripts like this. I can never quite bring myself to trust them with full access to all of my pages. This really should be a part of the browser functionality already.
But I agree, it should be a browser feature.
This surely would break someone's workflow ;)
https://xkcd.com/1172/
Also open the door to bugs like "why is this loading the scripts of another user?" which can be security threats.
It's "just" a simple feature, but it still have costs. I'd rather have the browser allowing me to load scripts without relying on an extension.
Given how many people here long for the quirky old days of the web, I say whomever starts a thread should also get to create a custom CSS theme for it.
- Using the JavaScript Intersection Observer may be an interesting addition, as this would explicitly differentiate comments on the thread which you may not have scrolled down to.
I love one-thing-well items of code instead of large (and thus non-secure) abstractions built upon other abstractions. Big fan of the K.I.S.S principle https://en.wikipedia.org/wiki/KISS_principle
https://greasyfork.org/en/scripts/423969-hn-style-unread-con...
It uses IntersectionObserver for "exposition watch" and "crypto.subtle.digest" for SHA-1 hashes - I was pleasantly surprised those native APIs are enough to get this magic working.
It's very POC-ey (absolutely no checks for storage capacity etc) but works quite well for me.
E: Actual markers are just light green right borders on "unread" items that slightly fades out after "exposition timeout". I'm using dark userstyle for HN (https://uso.kkx.one/style/71155 ); in default theme they are probably too light to be visible.
That way the script only has to store the timestamps on which you visit a comment section, not the comment ids.
Additionally, that way you can select "highlight all comments since visit [...]" with a dropdown from which you can choose out of all recent visits you did.
Sadly, Hacker News does not provide any such metadata in the markup. (Just like the comment formatting is shit, and the markup structure is as well. HN should just copy the nesting markup and formatting 1:1 from reddit, and it'd be massively improved already).
https://xkcd.com/1172/
I like the fact that HN is so "stable".
Neat!
I also think it would make sense to store the page load time, and compare to a comment's post time to determine if it's new instead of storing all comment ids.
The CSS is trickier due to the HTML structure.
Edit: I used the actual bell emoji in the code, but HN removed that, so I just replaced it with :bell:.
The read comments have striped background and orange bar on the right, so identifying unread is easy.
For example, do a Google search and click one of the links. Now do the same search again. The link you followed last time is now purple instead of blue. On Hacker News the links go a lighter grey.
----
Edit:
This works on Firefox:
- Install Stylus[0].
- Click the toolbar icon and choose Manage.
- Click "Write new style"
- Enter and save this:
[0] https://addons.mozilla.org/en-US/firefox/addon/styl-us/----
Edit 2:
In Firefox WITHOUT installing any add-ons:
- Go to about:config
- Set toolkit.legacyUserProfileCustomizations.stylesheets to true
- Press Alt, click Help -> More Troubleshooting Information
- Next to "Profile Folder", click Open Folder
- Create a new folder there called "chrome"
- Make a file in that folder called userContent.css
- Enter the following CSS:
- Restart FirefoxYet I do this more on HN than any other site since I don't know if someone's responded to me.
Noprocrast was... helpful, I guess, but I found myself racing to make poor quality responses sometimes, or HN was constantly locked out whenever I wanted to take a short break, instead of being able to take the time to respond with a thoughtful answer.
If you are going to post a comment that does nothing more than respond to the previous person, you are doing a disservice by forcing thousands of people to read text that is likely irrelevant or unhelpful to them.
The fact that this site is designed to prevent this behavior is one of its stronger points IMHO
Response notifications will primarily be used by people to dominate the chat, and your use case doesn't negate that.
That said, I'd really like a way to find, distraction free(so in some submenu), reply comments.
The current way seems narcissistic, as I have to go through my whole history to see why may have replied. And even then I have to do math to figure out if I'd seen it or not.
If you sign up to the alpha-testing HN[0], you get access to the thread feature, which is... (quoted from my forwarded mail)
> New feature: when you visit a thread, the software now highlights
> comments that are new since you last viewed the page. These are
> displayed with an orange (or whatever your topcolor is) bar to the
> left of the new comment. Refreshing the page will reset these.
Very useful, I can't imagine having HN without these indicators any more.
[0]: https://news.ycombinator.com/item?id=22788678
https://news.ycombinator.com/item?id=25424560
It would be nice if awareness of this was more visible, maybe as a link on the footer, with a list of in progress or planned features.
Surprisingly it doesn't annoy me, because I'm often clicking on the comments I read anyway. (Old habit.)
EDIT: I changed it to onmousemove. Feels pretty nice!
It adds a small bell icon with a dropdown to the navbar that shows new replies to your posts and comments. 10/10, would recommend.
[0]: https://chrome.google.com/webstore/detail/hacker-news-notifi...
There is a Chrome extension "Custom Javascript for Website" (link in the first line of the snippet) that lets you add JS scripts to any website.
Install the extension, then while on hackernews, open the extension and copy-paste the snippet into it.