Hacker News new | ask | show | jobs
by i336_ 3911 days ago
I followed this thread with much interest, and I'm glad I did.

I was just gilded this afternoon, and was able to confirm for the first time that new comment highlighting is not particularly hard for RES to pull off, it just doesn't do it for political reasons.

Hence, the only way would be to quietly develop an extension for the purpose... or, strike the jackpot, and come across someone who's done just that :D

Might I borrow your extension? =P

(My email address is in my profile if you prefer to respond that way)

1 comments

The extension currently is designed to only run on my system, as I wanted to be able to sync comment times between my computers.

So you’ll need to write an endpoint that stores the data somewhere, I'll link you my current solution.

First, the actual script that I load: http://cdn.kuschku.de/reddit-silver/reddit-silver-comments.j...

Second, the way I load it into the page: http://hastebin.com/raw/sugixafeve.js (You’ll need to adapt that, too, as Userscripts or extensions can’t easily interface with the rest of the page normally)

Third, the code of the endpoint that I use: http://hastebin.com/raw/gipubidevu.php

Last: You’ll need to set up localStorage.authkey to be equal to the auth key you set in the php script, you’ll want to host the PHP script on some server, and you’ll want to create an SQLite database on that server, give your PHP environment write access to that database, and initialize the database with a table:

    CREATE TABLE `reddit-silver-comments`( `thread-id` TEXT PRIMARY KEY NOT NULL, `values` TEXT NOT NULL);
After that, just modify the URL in the first script to point instead of my server to your server

    ------------------------
If you want, I can write you an alternative version that stores the data in local IndexedDB, but then it’s not synced between devices.
Wow, thanks!

You've definitely given me some awesome ideas with this. My implementation is likely to be slightly different, but your links are an awesome start and will definitely come in handy.

I'll likely take a while to get to actually implementing my idea (>.>), but I think it'd be cool to share my implementation when I (finally) finish it. How best can I get back to you in perhaps a month or two?

Sure, contact me at newsletter@kuschku.de (that email goes per default to my spam folder, if you send me an email today I’ll whitelist your address).

And the implementation is very simple: I just store every timestamp when you visit a thread (unless you visited it in the last 5 minutes already), and then just display those in a list.

Highlighting then all comments that were created after that timestamp is pretty simple.