Div questions May 10, 2005 8:30 AM   Subscribe

How about enclosing individual comments in a div? This would make the site friendlier to things like greasemonkey (if this is considered desirable).
posted by Capn to Feature Requests at 8:30 AM (12 comments total)

A div enclosure around comments would make my rss feeds a lot simpler to produce. It would also make it easier for me to add arbitrary RSS feeds because I wouldn't have to write complex parsers.

The biggest problem I've run into is that AskMe, MeTa and MeFi are all formatted differently enough that they require three different parsers. A div enclosure for posts and comments would be nice, but it's only a small step in the machine readable direction. It would be nice if all of the properties were valid XHTML or even XML with XSLT, but I fear I ask for the improbable.
posted by sequential at 9:38 AM on May 10, 2005

Can ye not wait for the redesign, Capn?

Yarr. Where's me grog?
posted by NinjaPirate at 9:42 AM on May 10, 2005

peating and repeating and repeating.
posted by quonsar at 11:05 AM on May 10, 2005

Avast ye ancestor dishonouring cur! I can not wait! And it seems like a simple thing that could be done invisibly and without much hassle.
posted by Capn at 11:07 AM on May 10, 2005

Hehe @ q.
posted by Civil_Disobedient at 12:16 PM on May 10, 2005

The people: We would really like feature X for the following reasons ...

Metafilter: *stoic silence*

TP: Seriously, it's not a big deal and would help out x, y, and z

Metafilter: *stoic silence*

TP: Hey, how about that X?

quonasar: Hey, Old Time Filterians, let's mock The People for bringing up something that's been brought up before.
posted by Capn at 1:31 PM on May 10, 2005

You can of course do this on the client side -- the algorithm is basically to look for the "posted by", "at" and flag URLs. In a browser, that's mostly a case of walking the "links" array, skipping over links that are within comments, and appending all the nodes up to and including the flag URL into a div. If you're looking at unprocessed source, you create a regular expression out of those three links. (But don't try to create three REs, you'll get fouled up when somebody include a link to a user in a comment, and always look for the pattern of BRs and whitespace matt putts after each comment, so that spurious posted-bys, used as a joke, don't fool you.)

But in JavaScript, on posts with more than 200 comments, this can take too long, up to three seconds on an old box. For an automated non-interactive process (or using a faster languages than JavaScript) this might be acceptable.
posted by orthogonality at 2:20 PM on May 10, 2005


quonsar: Hey, Old Time Filterians, let's mock The People Sysop for bringing up something that's been brought up before repeatedly failing to respond.
posted by quonsar at 2:50 PM on May 10, 2005

Don't worry; he'll have a lot more time this summer.

*laughs until she poos herself*
posted by mathowie's baby at 3:04 PM on May 10, 2005

posted by 40 Watt at 3:57 PM on May 10, 2005

And please add the poster's username to each div's classes? Mmm, instant user-stylesheet killfile...
posted by nicwolff at 6:58 PM on May 10, 2005

Sorry Q, I misunderstood who was being mocked for what.
(but as long as there *is* mocking involved, I guess I'm ok with it)
posted by Capn at 9:49 PM on May 10, 2005

« Older And more newsfilter....   |   Can you unmark an answer as a best? Newer »

You are not logged in, either login or create an account to post comments