Wei_Dai comments on Less Wrong: Open Thread, September 2010 - Less Wrong

3 Post author: matt 01 September 2010 01:40AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (610)

You are viewing a single comment's thread.

Comment author: Wei_Dai 10 September 2010 07:27:28AM *  16 points [-]

An Alternative To "Recent Comments"

For those who may be having trouble keeping up with "Recent Comments" or finding the interface a bit plain, I've written a Greasemonkey script to make it easier/prettier. Here is a screenshot.

Explanation of features:

  • loads and threads up to 400 most recent comments on one screen
  • use [↑] and [↓] to mark favored/disfavored authors
  • comments are color coded based on author/points (pink) and recency (yellow)
  • replies to you are outlined in red
  • hover over [+] to view single collapsed comment
  • hover over/click [^] to highlight/scroll to parent comment
  • marks comments read (grey) based on scrolling
  • shows only new/unread comments upon refresh
  • date/time are converted to your local time zone
  • click comment date/time for permalink

To install, first get Greasemonkey, then click here. Once that's done, use this link to get to the reader interface.

ETA: I've placed the script is in the public domain. Chrome is not supported.

Comment author: Wei_Dai 10 September 2010 08:35:57AM 4 points [-]

Here's something else I wrote a while ago: a script that gives all the comments and posts of a user on one page, so you can save them to a file or search more easily. You don't need Greasemonkey for this one, just visit http://www.ibiblio.org/weidai/lesswrong_user.php

I put in a 1-hour cache to reduce server load, so you may not see the user's latest work.

Comment author: NihilCredo 17 September 2010 08:56:36PM *  0 points [-]

May I suggest submitting the script to userscripts.org? It will make it easier for future LessWrong readers to find it, as well as detectable by Greasefire.

Comment author: ata 10 September 2010 09:12:22PM *  0 points [-]

Nice! Thanks.

Edit: "shows only new/unread comments upon refresh" — how does it determine readness?

Comment author: Wei_Dai 10 September 2010 09:59:10PM 0 points [-]

Any comment that has been scrolled off the screen for 5 seconds is considered read. (If you scroll back, you can see that the text and border have turn from black to gray.) If you scroll to the bottom and stay there for 5 seconds, all comments are marked read.

Comment author: andreas 10 September 2010 09:08:56PM 0 points [-]

Thanks for coding this!

Currently, the script does not work in Chrome (which supports Greasemonkey out of the box).

Comment author: Wei_Dai 10 September 2010 10:07:44PM *  1 point [-]

From http://dev.chromium.org/developers/design-documents/user-scripts

  • Chromium does not support @require, @resource, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue
  • GM_xmlhttpRequest is same-origin only

My script uses 4 out of these 6 features, and also cross-domain GM_xmlhttpRequest (the comments are actually loaded from a PHP script hosted elsewhere, because LW doesn't seem to provide a way to grab 400 comments at once), so it's going to have to stay Firefox-only for the time being.

Oh, in case anyone developing LW is reading this, I release my script into the public domain, so feel free to incorporate the features into LW itself.

Comment author: Morendil 10 September 2010 01:45:31PM 0 points [-]

Would you consider making display of author names and points a toggle and hidden by default, à la Anti-Kibitzer?

Comment author: Wei_Dai 10 September 2010 06:50:21PM 1 point [-]

I've added some code to disable the author/points-based coloring when Anti-Kibitzer is turned on in your account preferences. (Names and points are already hidden by the Anti-Kibitzer.) Here is version 1.0.1.

More feature requests or bug reports are welcome.