Slashdot - Single Page View

Here's the latest addition to my "single page view" series, this time for slashdot. Slashdot - Single Page View allows you to expand comments without reloading the page.
Clicking a "x replies beneath your current threshold" link will fetch the relevant comments in the background and merge them into the current view.
If you click the same link again will collapse it back to the original view.

This screenshot illustrates a sample Slashdot comment before and after modification, and the result of an expansion using the modified link.
Note that the yellow hightlights were added to the screen capture and are not part of the Greasemonkey script ;-)

Because the script only knows how to expand the "x replies beneath your current threshold" links, but not the other sub-thread links, it works best with a high threshold (4 or 5) to avoid getting links that can't be expanded (yet).

This script also combines nicely with Matt's Slashdot Live Comment Tree script, which allows you to expand and collapse threads that are visible in a given page.

Posted by Julien on July 26, 2005. Permalink
Comments

This script needs to do a lot more. There are many other ways in which Slashdot "hides" comments. One of those, for example, is the link "Read the rest of the comment" for long posts. Other one is simply the link to the comment, without the comment's body. You can see many of those here:
http://science.slashdot.org/article.pl?sid=05/07/26/185212&threshold=1&tid=126&tid=103&tid=14

in the form of:
# Re:Bill Gates on US Education by Urchlay (Score:2) Wednesday July 27, @02:31AM
# Re:Bill Gates on US Education by siplus (Score:1) Wednesday July 27, @02:59AM
# Re:Bill Gates on US Education by Frank T. Lofaro Jr. (Score:2) Wednesday July 27, @03:19AM


All of them could benefit greatly from this script.

Posted by: Paul Goscicki at July 27, 2005 05:32 AM

Hi Paul,

Thanks for your feedback.
I discovered about these links yesterday and tried to make them work, but they are pretty ugly. I don't have a good solution for them yet. I'm thinking of extracting single comments from a page (using the fragment identifier), but Slashdot's markup is super super ugly...
In the meanwhile, I recommend you change your moderation filter to 5 (which is what I had) for best results with this script.

Cheers,
Julien

Posted by: Julien Couvreur at July 27, 2005 08:57 AM

Funny thing, at threshold 5 the script broke down. Show/hide urls doesnt expand anything. Here's the url: http://developers.slashdot.org/comments.pl?sid=157124&threshold=5&mode=thread&commentsort=0&op=Change

Btw: I also use Slashdot recolor and Slashdot logo replacer scripts.

Btw2: Slashdot is generally super ugly, not only when it comes to markup.

Posted by: Paul Goscicki at July 27, 2005 12:33 PM

Hi Julien

Thanks for taking pains to let me know of this. Unfortunately, Greasemonkey doesn't work on my PPC Linux machine.

Will try out the plugin on my Windows box and let you know!

BTW, a user script to view only funny comments, or insightful one might be interesting.

Posted by: robotgeek at July 27, 2005 08:25 PM

Hi Paul,
It actually looks like it's a scraping issue on the different slashdot sub-domains.
The same article/comments using apple.slashdot.org as the domain appears to work:
http://apple.slashdot.org/comments.pl?sid=157124&threshold=5&mode=thread&commentsort=0&op=Change

I'll probably modify the script to force that domain for all article, as a workaround.

Posted by: Julien Couvreur at July 28, 2005 08:50 AM

It looks like Slashdot is getting ready for a CSS-based facelift: http://www.newsgoat.com/2005/07/27/slashdot-css-for-nerds-markup-that-matters/
When that happens, I'll try to fix this user script to work with the new (and hopefully cleaner) markup.

Posted by: Julien at July 28, 2005 02:14 PM

Yeah, the CSS version should help alot. Tables can get ugly real quick for things like comments scripts.

Posted by: dusty at August 2, 2005 10:27 AM

The CSS version is helpful. It contribute a lot to the appearence of the blog.

Posted by: Stewart at January 6, 2006 10:52 AM
Trackbacks
Mashing Slashdot
Excerpt: Marc Boucher has generously taken a crack at cleaning up and improving the quick-and-dirty hack I call "Slashdot Live Comment Tree”. I've made his emails, which describe the process in detail, available on this blog. In his last mail he says: ...
Weblog: Peer Pressure
Tracked: July 28, 2005 11:54 AM
Comments are closed. You can contact me by email.