27
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 29 Jul 2024
27 points (100.0% liked)
TechTakes
1489 readers
29 users here now
Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.
This is not debate club. Unless it’s amusing debate.
For actually-good tech, you want our NotAwfulTech community
founded 2 years ago
MODERATORS
Here's a quick and dirty vanilla js script that highlights all posts in a thread according to how recent they are, the brighter the newer, and alse separately highlights new posts, to make long running threads easier to follow. I'm posting it in the stubsack because it's the thread I had in mind when writing it.
Pasting it in the browser's console and pressing enter should be enough for the page you have open, not that I've cross tested it any... Worst case scenario it does nothing or it colors the posts wrong and you just reload the page, I swear it won't steal your crypto, or mine any new.
In Firefox you can find the console by pressing F12 and selecting the console tab.
edit: Also if you prepend javascript: to the code and store it as a bookmark you can just invoke it by calling the bookmark, like a macro, see https://awful.systems/comment/4173451
Note: longer threads don't load all comments at once, so you'll have to rerun the script if you scroll down far enough.
edit: fixed for Edge, because why wouldn't it show dates differently there.
edit: updated it to check if there's a (xx New) notice in the post count in the OP and use the number to highlight the latest xx posts, i.e. all post made since the last time you were here. Change the value of variable newPostColor if you don't like the lovely shade of lavender I picked. Depending on if edited posts are counted as new or not the count might be off, and like, what if there's a new post that's also been edited? Solving that seems to mean moving away from the warmth and comfort of the quick and dirty territory, and also is there a public philthy repository somewhere?
edit: here's how it looks in the SAP thread:
edit: NEW: added some legibility changes and also consecutive executions now toggle old post highlights.
Code now in spoiler:
spoiler
In the spirit of "worse is better", here is a ublock filter I just threw together to highlight all the comments less than a day old:
EDIT: fix bug with 1 hour and 20 minutes ago. regex is even worse is better.
I love this but I don't know if I have the same royal Grape Fanta energy in me. I think I'm on one of the alternate themes but I like #333333
the way you made it, it works only for awful.systems users
other handy thing you can do: make a bookmark that has the URL be
javascript:(function() { function bits go here} )();
, and stick it in your bookmark barYes, do this if your browser allows it, it's way better. Just paste the code in the OP prepended by "javascript:" without quotes in place of the url and as far as i can tell it works.
I only now saw how badly the syntax on my post is fucked, that’s what I get for trying to snip things in a dodgy textentry rather than a real editor 😅
leaving it up for posterity tho.
This is really cool!
I was just thinking it would be cool to have something like RES's 'Previously Read' feature that only shows the new comments, and everything else is darkened or collapsed. This does a similar thing though and it's great for these weekly threads