You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

Sorting Comments

-11 Post author: troll 24 April 2013 04:35PM

I'd like to be able to sort comments as a list, too.

An example of this would be sorting comments by new as a list so all the comments you read will be new ones.

Comments (10)

Comment author: faul_sname 24 April 2013 11:52:48PM *  4 points [-]

Open the web console. Paste the following in. Hit enter.

if(jQuery('.new-comment').length > 0) jQuery('.comment').not('.new-comment').children().filter('.entry').hide()
Comment author: troll 25 April 2013 01:14:28AM 4 points [-]

Thanks!

Is there any way to make this a little more automatic for the future?

Comment author: endoself 25 April 2013 02:21:59AM 3 points [-]

You can make it into a bookmarklet and add it to your bookmarks bar. I don't know what browser you're looking for, but you can google for specific instructions if you don't know how.

Comment author: troll 25 April 2013 03:35:17AM *  1 point [-]

Yup. I did that first thing.

But how do I sort the comments by new (and as a list?) Seeing only new comments is useful, but what about chronological ordering for all comments?

Comment author: endoself 25 April 2013 05:43:21PM 3 points [-]
(function($) {if($('.new-comment').length > 0) { var time = function(c) { return parseInt(jQuery(c).find('.comment-date').attr('time')); }; var new_comments = $('.new-comment').sort(function(a, b) { return time(b) - time(a); }); $('.realcomment').after(new_comments); }})(jQuery);

This should work. I put the newest ones first, but you can switch that by changing

time(b) - time(a)

to

time(a) - time(b)
Comment author: Decius 24 April 2013 07:37:07PM 2 points [-]

How does that differ from "Sort By:New"?

Comment author: troll 24 April 2013 09:55:06PM *  6 points [-]

That's in a tree. (new posts under old ones won't be before the old ones)

Comment author: jamesf 24 April 2013 11:39:53PM 3 points [-]
  1. Open thread
  2. There's not a "person who makes all the site changes people want". Site changes seem to always be on a volunteer basis (meaning, do it yourself if you want it badly).
Comment author: troll 25 April 2013 01:25:17AM 2 points [-]

Open thread? What?

Nice! How do I go about adding a feature to the site that everyone can use?

Comment author: Qiaochu_Yuan 25 April 2013 01:54:44AM 3 points [-]