Marcello comments on LessWrong anti-kibitzer (hides comment authors and vote counts) - Less Wrong

59 Post author: Marcello 09 March 2009 07:18PM

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

Comments (52)

You are viewing a single comment's thread. Show more comments above.

Comment author: Eliezer_Yudkowsky 09 March 2009 09:10:28PM 1 point [-]

Well, to kibitz the anti-kibitzing, it looks to me like:

by <a href="http://lesswrong.com/user/Marcello"><strong>Marcello</strong></a>

would match pretty easily against something that looked for

by <a href="http://lesswrong.com/user/(.+)"><strong>(.+)</strong></a>

and deleted it, similarly on the Recent Posts but without the <strong>, checking for the identity of the two matched strings is optional (I forget how to do this offhand with REs).

Comment author: Marcello 09 March 2009 09:46:37PM 3 points [-]

That particular hack looks like a bad idea. What if somebody actually put a bold-face link into a post or comment? However, your original suggestion wan't as bad. All non-relative links to user pages get blocked by the anti-kibitzer. (Links in "Top contributors" and stuff in comments seem to be turned into relative links if they point inside LW.) It's gross, but it works.

Version 0.2 is now up. It hides everything except the point-counts on the recent posts (there was no tag around those.) (Incidentally, I don't have regular expressions because by the time my script gets its hands on the data, it's not a string at all, but a DOM-tree. So, you'd have to specify it in XPath.)

I think trying to do any more at this point would be pointless. Most of the effort involved in getting something like this to be perfect would be gruesome reverse engineering, which would all break the minute the site maintainers change something. The right thing to do(TM) would be to get the people at Tricycle to implement the feature (I hereby put the code I wrote into the public domain, yada yada.) Then we don't have to worry about having to detect which part of the page something belongs to because the server actually knows.

Comment author: matt 10 March 2009 04:58:57AM 4 points [-]

I hereby put the code I wrote into the public domain, yada yada.

A great way to put your code into the public domain would be to put it up somewhere like (ideally exactly like, because they're very awesome) http://github.com/.

If anyone else wants to modify your code the git (and GitHub) workflow is very good - anyone can fork your repository, and if you want to accept their changes that's easy for you to do.

See the GitHub Guides if you're interested.