Less Wrong is a community blog devoted to refining the art of human rationality. Please visit our About page for more information.

Comment author: Risto_Saarelma 14 August 2014 06:17:48AM *  0 points [-]

The widget shows items under "comment score below threshold" threads, but clicking on those comments in the widget panel doesn't do anything. Ideal behavior would be to open the "comment score below threshold" JavaScript link when clicking the item, possibly also to use a different rendering color for these items in the widget to go along with the bad thread filtering spirit and give the user an opportunity to skip them without reading.

This whole project is making me think that websites like LW with moderately complex use patterns could just be database APIs on the server side and have the client side HTML rendering and all made entirely in JavaScript so that people could do drastic usability changes by just changing the default frontend source. Of course that would also make hostile botting much easier.

Comment author: Bakkot 14 August 2014 07:16:24AM *  0 points [-]

Good catch. Don't think I'm going to change the behavior, as there's complex cases where there's no obvious behavior: suppose you have a highly upvoted comment, whose parent and grandparent are both below the threshold. Do you color it in the widget differently from its parents? Do you expand both its parent and grandparent when it's clicked on, in order that it be on the page and thus scrollable to? Do you mark its parent somehow so the reader knows that comment wouldn't normally have been displayed?

So I think I'm OK with clicking on a comment which is hidden doing nothing. It's maybe worth greying out such comments in the list, so as not to confuse people when nothing happens, but I feel like this mostly just ends up highlighting them, so I'm not going to put that in the main script. If you want that feature, though, I pushed it to an alternative branch on the github repo, and you can find it here. Comments will remain greyed even if you've un-hidden their parents, but will become scrollable to.

Comment author: Risto_Saarelma 13 August 2014 07:15:42AM 0 points [-]

I always see the widget showing 0 new comments when entering pages, even when there are new comments LW is highlighting with the pink border.

Comment author: Bakkot 13 August 2014 05:56:06PM 0 points [-]

Huh. Try the most recent version (as of just now).

Comment author: Risto_Saarelma 13 August 2014 05:41:03AM *  0 points [-]

Should this remember the previous timestamp when you revisit a page and new comments have been posted? It seems to always start out showing 0 new comments for me before I manually adjust the time. (The SSC one does show me comments after the previous visit when I revisit a page.)

Comment author: Bakkot 13 August 2014 06:01:33AM 0 points [-]

The way it currently works - at least, the way I designed it, and the way it seems to work for me - is that it doesn't remember anything between visits, but rather determines which comments are new since your last visit by looking at the highlight provided by LW's server. If there were comments made since your last visit, they should be highlighted with or without the script; no custom highlighting will be performed until you manually change the timestamp.

If you aren't seeing new comments highlighted, it's (almost certainly) because LW isn't highlighting them - maybe you're logged out, or loaded the page elsewhere, or have never visited the page? [In this way the LW script differs from the SSC script, because the LW server regards "never visited" as "nothing new" whereas my SSC script regards "never visited" as "everything new".]

The reason I did it this way is that LW, unlike SSC, is itself keeping a record of which comments are new since your last visit, which works even if you loaded the page on another computer (but the same account). I didn't want to mess with the built-in mechanism, only allow you to change it per-visit if necessary.

Comment author: Risto_Saarelma 11 August 2014 03:38:46AM *  1 point [-]

The use case is that I go to the top page of a huge thread, the only new messages are under a "Continue this thread" link, and I want the widget to tell me that there are new messages and help me find them. I don't want to have to open every "Continue" link to see if there are new messages under one of them.

Comment author: Bakkot 11 August 2014 04:48:01AM 0 points [-]

Ah. That's much more work, since there's no way of knowing if there's new comments in such a situation without fetching all of those pages. I might make that happen at some point, but not tonight.

Comment author: Risto_Saarelma 10 August 2014 08:23:10AM 1 point [-]

This doesn't seem to handle stuff deep enough in the reply chain to be behind "continue this thread" links. On the massive threads where you most need the thing, a lot of the discussion is going to end up beyond those.

Comment author: Bakkot 10 August 2014 03:29:52PM *  0 points [-]

It seems to work for me. "Continue this thread" brings you to a new page, so you'll have to set the time again, is all. Comments under a "Load more" won't be properly highlighted until you click in and out of the time textbox after loading them.

Comment author: NancyLebovitz 09 August 2014 10:40:57PM 0 points [-]

How do I edit the date/time?

I've tried changing numbers and refreshing the page, and the date/time just reverts to what it was.

Comment author: Bakkot 09 August 2014 11:57:12PM *  1 point [-]

Don't refresh - just hit enter, or otherwise defocus the textbox (click anywhere else on the page, or hit tab). It'll apply automatically and only lasts while the page is loaded; the time you enter doesn't get saved when you reload.

LW client-side comment improvements

34 Bakkot 07 August 2014 08:40PM

All of these things I mentioned in the most recent open thread, but since the first one is directly relevant and the comment where I posted it somewhat hard to come across, I figured I'd make a post too.

 

Custom Comment Highlights

NOTE FOR FIREFOX USERS: this contained a bug which has been squashed, causing the list of comments not to be automatically populated (depending on your version of Firefox). I suggest reinstalling. Sorry, no automatic updates unless you use the Chrome extension (though with >50% probability there will be no further updates).

You know how the highlight for new comments on Less Wrong threads disappears if you reload the page, making it difficult to find those comments again? Here is a userscript you can install to fix that (provided you're on Firefox or Chrome). Once installed, you can set the date after which comments are highlighted, and easily scroll to new comments. See screenshots. Installation is straightforward (especially for Chrome, since I made an extension as well).

Bonus: works even if you're logged out or don't have an account, though you'll have to set the highlight time manually.


Delay Before Commenting

Another script to add a delay and checkbox reading "In posting this, I am making a good-faith contribution to the collective search for truth." before allowing you to comment. Made in response to a comment by army1987.


Slate Star Codex Comment Highlighter

Edit: You no longer need to install this, since Scott's added it to his blog. Unless you want the little numbers in the title bar.

Yet another script, to make finding recent comments over at Slate Star Codex a lot easier. Also comes in Chrome extension flavor. See screenshots. Not directly relevant to Less Wrong, but there's a lot of overlap in readership, so you may be interested.

Note for LW Admins / Yvain
These would be straightforward to make available to all users (on sufficiently modern browsers), since they're just a bit of Javascript getting injected. If you'd like to, feel free, and message me if I can be of help.
Comment author: NancyLebovitz 07 August 2014 05:01:20AM *  1 point [-]

Thank you. That worked. I never would have guessed that an icon which simply had the word "free" on it was the download button.

Would it be worth your while to do this for LW? It makes me crazy that the purple edges for new comments are irretrievably lost if the page is downloaded again.

Comment author: Bakkot 07 August 2014 07:57:34PM *  3 points [-]

Would it be worth your while to do this for LW?

Sure. Remarkably little effort required, it turned out. (Chrome extension is here.)

I guess I'll make a post about this too, since it's directly relevant to LW.

Comment author: NancyLebovitz 06 August 2014 07:03:25PM 0 points [-]

I tried downloading it by clicking on "install the extension", but it doesn't seem to get to my browser (Chrome). Am I missing something?.

Comment author: Bakkot 06 August 2014 09:07:19PM 3 points [-]

"Install the extension" is a link bringing you to the chrome web store, where you can install it by clicking in the upper-right. The link is this, in case it's Github giving you trouble somehow.

If the Chrome web store isn't recognizing that you're running Chrome, that's probably not a thing I can fix, though you could try saving this link as something.user.js, opening chrome://extensions, and dragging the file onto the window.

Comment author: army1987 05 August 2014 10:06:03PM 0 points [-]

Nope, doesn't seem to work. (I am probably doing something wrong as I never used Greasemonkey before.)

Comment author: Bakkot 05 August 2014 10:35:50PM *  1 point [-]

Just tested this on a clean FF profile, so it's almost certainly something on your end. Did you successfully install the script? You should've gotten an image which looks something like this, and if you go to Greasemonkey's menu while on a LW thread, you should be able to see it in the list of scripts run for that page. Also, note that you have to refresh/load a new page for it to show up after installation.

Oh, and it only works for new comments, not new posts. It should look something like this, and similarly for replies.

ETA: helpful debugging info: if you can, let me know what page it's not working on, and let me know if there's any errors in the developer console (shift-control-K or command-option-K for windows and Mac respectively).

View more: Next