|
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. |
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?