Firefox extension March 3, 2005 6:52 PM   Subscribe

I'm considering writing a Firefox extension for Metafilter. Would anyone use it? [+]
posted by orthogonality to MetaFilter-Related at 6:52 PM (49 comments total)

One thing I'm thinking about is adding a red line to comments pages after the last comment the user has read, so that one can find new-to-you comments easily, as the "new comments" link appears only to operate on time since the comments were posted, not since the user last looked at that page. Is this worth having? Is it in any way bad to have?

Another thing I'm considering is letting the user maintain a list of users, and highlighting comments by users on that list. Is this worth having? Is it in any way bad to have?

Are there other features that would be useful in an extension?
posted by orthogonality at 6:56 PM on March 3, 2005


I'd most like quoting and formatting extensions to the text box specific to metafilter. When I've thought about writing a mefi-specific mozilla extension, that's what I've considered. For example, to quote someone you could just select the text and, using a function provided by the extension, it's pasted into the text window with the appropriate formatting and an attribution and link to the comment quoted.
posted by Ethereal Bligh at 7:14 PM on March 3, 2005


Sounds good to me, ortho!

EB: sorta like metafilthy?
posted by googly at 7:18 PM on March 3, 2005


Wow, that's awesome! They need to list that at the Firefox/Mozilla extensions site. (I looked there for mefi-specific extensions, there were none listed.)

Thanks googly and great job TP Diffenbach!
posted by Ethereal Bligh at 7:23 PM on March 3, 2005


That said, there's this privacy notice on the metafilthy page:

"Metafilthy communicates with its author's web site when you use it, to check for newer versions and to transmit debugging information consisting of your metafilter.com user name, user id, and the url of the page you're commenting on."

That gives me slight pause. With no intent to besmirch anyone and just being careful, I wonder: has anyone packet sniffed to see what's actually being xmitted?
posted by Ethereal Bligh at 7:26 PM on March 3, 2005


Ethereal Bligh writes "With no intent to besmirch anyone and just being careful, I wonder: has anyone packet sniffed to see what's actually being xmitted?"

The xpi contains the javascript source. Have a look.
posted by orthogonality at 7:29 PM on March 3, 2005


Are there other features that would be useful in an extension?

Yes. The ability to record MeTa posts that are deleted.
posted by Ryvar at 7:30 PM on March 3, 2005


It'd be nifty if there was some indication made wherever a comment has been deleted. Maybe a dotted black line or something.
posted by me3dia at 7:42 PM on March 3, 2005


orthogonality writes " The xpi contains the javascript source. Have a look."

Ah:
function shoutout( u, pu ) {    req = new XMLHttpRequest();    var data = "user=" + escape( u ? u[ 0 ] : "" )       + "&userUrl=" + escape( u ? u[ 1 ] : "" ) + "&postUrl=" + escape( pu ) ;    req.open( "GET", "http://www.diffenbach.org/metafilthy/latestversion.xml?" + data, true );    req.onreadystatechange = function( aEvt ) {      if( req.readyState == 4 ) {        if( !req.status || req.status == 200 ) {          gMetafilthy.shoutoutResponse( req.responseXML ) ;        }      }    } ;    req.send(null);   }
S'okay. I'd really like, however, the format to be:
orthogonality writes:
The xpi contains the javascript source. Have a look.
Or:
orthogonality writes:
“The xpi contains the javascript source. Have a look.”
I think using ⟨em⟩ (which for most of us will italicize) and using double-hash as double-quotes is irregular, isn't it? One or the other. I think I'd prefer no emphasis with correct html entity double-quotes. Also, using blockquotes but correcting for the added CR/LF that Matt retains from the textbox.
posted by Ethereal Bligh at 8:09 PM on March 3, 2005


Ethereal Bligh writes " I think I'd prefer no emphasis with correct html entity double-quotes."

Will correct HTML entity double quotes display correctly for everybody (including, say, on handhelds or cell phones?). In that same vein, using both italics and double quotes makes for something that stands out visually where EM is rendered as italics, but is in double quotes on probably any device.

Blockquotes I'd argue take up too much vertical space.

To me, if I just see italics, it's not immediately obvious it's a quote. If I see double quotes, it is, but it isn't visual different from the text of the response; that's why I like having both.
posted by orthogonality at 8:53 PM on March 3, 2005


Good points.
posted by Ethereal Bligh at 9:00 PM on March 3, 2005


I would appreciate and use the 'red-line' function. Which tells me I should now back away from my computer. I like the idea-- I always do this mental-last-timestamp kind of thing, but I'm easily distracted, and rarely find my place again. Am I going to look stupid here for encouraging something that's already been discussed to death, but that I can't really be bothered to research?
posted by mireille at 9:25 PM on March 3, 2005


I would like the ability to highlight a phrase and automatically insert that phrase into the string "Metafilter: [highlighted phrase]" in the comments box, and then to hit post. Then I would like my keyboard to give me a jolt of about 30 volts.

Seriously, is it possible to create a personal banhammer, with probation? If I click on the little bomb next to a post of quonsar's three times, quonsar disappears from my view of MeFi forever? Not to pick on quonsar.
posted by stupidsexyFlanders at 9:35 PM on March 3, 2005


stupidsexyFlanders writes "If I click on the little bomb next to a post of quonsar's three times, quonsar disappears from my view of MeFi forever?"

Easily possible. I even gave it some thought. But I don't want to write it.

I think that kill files (and that's essentially what you're asking for) are great for usenet, but Metafilter is meant to be a community. Permanently not seeing some commenters' comments threatens to polarize that community or even to break it into pieces.

And, within a community, ignoring someone means taht you don't see what others in the community see -- it distances you from the "real" metafilter as much as it distances you from the comments you don't want to see.

For instance, if someone complains about, oh, strident post, but you've blocked orthogonality and most other strident posters, you'll respond tat you don't see a need for any changes to the community.

So after considering a kill-file like function, I then thought about a highlighting function. You'd still see all comments, but certain ones you'd highlight. It would be similar to being attuned to someone in meatspace, and listening more closely when that person spoke.

I intentionally only want to have one form of highlighting, so people can't, say, highlight dhoyt and Paris Paramus and koselitz with one color -- say red -- and y2karl and delmoi and orthogonality with another -- say blue -- and then ignore Red State-ments or Blue State-ments.

Sure, highlight the people you know you agree with, but also highlight the ones you want to keep a close eye on -- but use the single color highlighting to indicate greater saliency, not an opinion previously arrived at.
posted by orthogonality at 9:53 PM on March 3, 2005


me3dia writes "It'd be nifty if there was some indication made wherever a comment has been deleted. Maybe a dotted black line or something."

To do the red/read line, we'd have to record the last post in some way, right? But since posts can be deleted, to have a good program, we'd have to record the second-to-last post as a backup. But since posts can be deleted...

It quickly became apparent that in order to accurately produce a "new posts start here line", we'd have to make note of all posts -- and so pointing out deleted posts could naturally fall out of that as a by-product.
posted by orthogonality at 9:56 PM on March 3, 2005


Orthogonality, here's a pony:

How about, the extension looks to see if any text that you've written has been quoted in another user's comment, then highlights it? That way you'd know if people have responded to you.
posted by Hildago at 10:17 PM on March 3, 2005


Err, how do I install Metafilthy? FF just prompts for a "what do I do with this file?" as opposed to the install dialog that shows up when I click on a download link of an .xpi at update.mozilla.org. I allowed the diffenbach.org domain in "allow site to install" in Options. Also tried running the downloaded file, and opening it with FF. No dice.
posted by Gyan at 10:53 PM on March 3, 2005


Hildago writes "...the extension looks to see if [your comment]... has been quoted in another user's comment, then highlights it? ...you'd know if people have responded to you."


Yeeeeah. That's damned difficult, because it gets into combinatorial explosions and even philosophical questions. Philosophical: what's the minimum word length of a string before it can be considered plagiarism; conversely, what's the minimum word length we'd use to "look for text you've written" that someone else is quoting?

Of course, we can just pick an arbitrary length, but: what if the quoting commenter does the right thing and boils your quote down to just the necessary bits, using ellipses? What if the quoter puts in brackets paraphrases of your comment? How do we tell that what I've quoted above is from your comment?

Sure, we can do various string matches and ring a bell if enough partial fragments match. But this will be computationally expensive, and we're already looking at doing sum( i..n-1 ) comparisons of two comments to each other, where n is the total number of comments in the thread. Matching every fragment of any three consecutive words in one against every three consecutive words in the other begins to add up: approximately wordlength( comment1 ) - 2 ? * wordlength( comment2 ) - 2, (not accounting for bailing out on wordlengths of size one).

You might say that we could look for tip offs, like blockquotes, or quotation marks, or even italics, but as Ethereal Bligh demonstrates "I think using (em) (which for most of us will italicize) and using double-hash as double-quotes is irregular, isn't it? One or the other.", various users will use various inconsistent ways to denote quotes.

I suspect the author of the extension googly linked to is looking to regularize comment quoting so that it can be easily recognized by both humans or even machines; while no one quoting style will make everyone happy, the value of a uniform style is that it soon becomes unambiguously clear what is a quote and what's not. This might explain why that extension doesn't have all the options Ethereal Bligh would like. Or I dunno, maybe that author is just lazy.

But since Ethereal Bligh also noted that other extension apparently "'transmit[s] debugging information consisting of your metafilter.com user name, user id, and the url of the page you're commenting on.', my guess is that its author hopes that if enough people use that extension, checking for who quoted whom would be as easy as checking the log that extension leaves. It's certainly easier to find a quote if the person quoting notes that he's doing so when he does it, which is essentially what that extension appears to be providing. (Or who knows, maybe it's sending that information as part of an elaborate scam.)

And indeed, if that other extension becomes widely used, one could easily highlight responses as you'd like, both via the author's log files and by grepping for the backlink it prepends to all quotes. Of course, that relies on users of that extension not removing the backlink generated by the other extension.

(And incidentally, I find it so frustrating when commenters quote another comment but don't link to it -- you get the quote out of context, you can't really follow it unless you page up and look for the original. Sometimes they don't even indicate whom they're quoting -- maybe these folks just have much sharper memories than mine.)
posted by orthogonality at 10:59 PM on March 3, 2005


Gyan writes "Err, how do I install Metafilthy? FF just prompts for a 'what do I do with this file?'"

Eh. It looks like the guy who hosts it doesn't actually have shell access to Apache and can't get the right mime-type sent for xpi. Do what I did: just download it and then either do File|Open on it locally, or, in Firefox, try to open it in the download list and when Firefox asks what application to open it with, tell it to open it with Firefox.
posted by orthogonality at 11:03 PM on March 3, 2005


Thanks, orthogonality, that worked.
posted by Gyan at 12:12 AM on March 4, 2005


metafilthy is great, thanks. also, I would use that firefox extension. I've been going mad looking for the last comment I read in a lengthy discussion.
posted by shmegegge at 12:22 AM on March 4, 2005


orthoganility:

You can find the largest common substring (of any length) between two strings in m*n time and m*n space where m, n are the lengths of the strings.

I did a java implementation and it takes 100ms to check two posts both 600 words in length. Say you have a 100 post thread in which you have made 10 replies and it takes on avg 100ms to do each check then the total time to check would be 90 seconds. So as you said its going to be too slow. :(
posted by drscroogemcduck at 4:40 AM on March 4, 2005


though.. you could get tricky and identify quoted posts by indexing (most obvious solution.. silly me)

ie grab all adjacent words of length n in the page that are authored by the user and put them in a hash table

then grab all adjacent words of length n in the page that are not authored by the user and check the hash table

if the adjacent words exist in the hashtable then you could assume the post quotes the users post

you could then optionally use the more complex algorithm to identify the full quote

but this is probably a bad idea
posted by drscroogemcduck at 4:57 AM on March 4, 2005


test
posted by orthogonality at 2:48 PM on March 4, 2005


testa
posted by orthogonality at 2:49 PM on March 4, 2005


orthogonality writes "testa"

ooh! it works! nice.
posted by sciurus at 3:22 PM on March 4, 2005


drscroogemcduck writes "I did a java implementation and it takes 100ms to check two posts both 600 words in length. Say you have a 100 post thread in which you have made 10 replies and it takes on avg 100ms to do each check then the total time to check would be 90 seconds. So as you said its going to be too slow. :("

Nice works, and thanks. One question: java or javaSCRIPT?
posted by orthogonality at 5:01 PM on March 4, 2005


Pretty please, delete this comment and the two test comments above?
posted by orthogonality at 10:41 AM on March 5, 2005


So, I've tried to modify the code for Metafilthy to post like this:
bugbread: This is what a quote would look like
But I've never worked with a FF extension before, and I can't seem to get the modified version to install. I unpacked the xpi, unpacked the jar file deeper in, made my changes, repacked the jar, and repacked the xpi, but when I try to install the modified version, it says "This item will be reinstalled when you restart Firefox", and no amount of restarting Firefox seems to actually install it (it says the same thing when I restart it). I deleted the {ed1940-20340293507-2492387}-like file that was associated with Metafilthy from my profile's extension folder, but still no dice. Anyone have any advice?
posted by Bugbread at 11:36 PM on March 5, 2005

bugbread: "no amount of restarting Firefox seems to actually install it"
Generally that means there's a syntax error in the javascript.
posted by orthogonality at 11:50 PM on March 5, 2005


Jottings:

Me no like blockquote for single lines. And indeed, style manuals say blockquote is only for multiple lines.

And I do prefer "X writes," with the link to what was written on the verb. "bugbread:" looks as if I'm addressing bugbread with a command-- "bugbread: do such-and-such" rather than quoting bugbread.

But the "X writes, " especially with the comma may be a bit too arch for everyone.

Ethereal Bligh's
"foo bar baz" -- author looks nice but seems a bit too fancy for a regular quote, and more what I'd use for an aphorism or famous quotation, especially when he also blockquotes it:
"Speak softly and carry a big stick" -- Teddy Roosevelt

Ethereal Bligh also likes HTML entity quotes, which I strongly suspect don't show up in all browsers.

The HTML quote tag doesn't nest properly in Firefox.

I'd prefer one style, to make the pattern recognition aspect of reading easier. But the unquote-marked, unattributed, italicized stuff stavros likes, well hell, there's no way to tell it's a quote.

You could set it off with a smaller font, but that's cruel to the eyes. Colored fonts clash with the Metafilter ambiance.

Thoughts?
posted by orthogonality at 12:05 AM on March 6, 2005


Ortho: Keep in mind, I'm not so much trying to "improve" and rerelease Metafilthy (1- Metafilthy is really good, and I doubt anything I could do would be an improvement, 2- I know jack about coding, and 3- I know nothing about licensing) as much as modify it for personal use (and, of course, if I can figure out how to do it, I can help others who want to modify it themselves), so in a sense I'd just be modifying it to do what I currently do manually.

You're right about the blockquote thing. If I knew anything about coding, I'd make Metafilthy have two context sensitive menu items, "Metafilthy" and "Metafilthy Block", and just select the "Metafilthy Block" for long quotes. Unfortunately, I'm absolutely nowhere near that level.

Ah, and on reflection: My example was bad. I was actually hoping to make it look like:

bugbread: "This is what a quote would look like"

I just forgot the quotes.

But with Dhruva's excellent suggestion to change "writes" to just ":", it looks a lot closer to what I want, and if further modification is really difficult, I guess I'll just stay with Metafilthy and ":".
posted by Bugbread at 12:21 AM on March 6, 2005


bugbread writes "bugbread: 'This is what a quote would look like'"


I could live with that, if bugbread was a backlink. For me backlicks are important, for when you get contentious arguments and you want to see the quote in context.

I suppse you could have MetaFilthy use blockquotes if the size of the quote were over some threshold. And since MetaFilthy will quote the whole thing (with right-click) or just a portion (with select then right-click), the user could control how much text was quoted.

Actually, that's a pretty good idea. Except I always just quote the whole thing and then trim off what I don't use.

So under threshold quotes and italics, over threshold no quotes, blockquote, and no italics?

The text of the backlink is already configurable, so you can change it to a colon now, the only problem is that MetaFilthy inserts a space before the backlink in an attempt to be user friendly. And that clicking on a colon is damned hard.
posted by orthogonality at 12:34 AM on March 6, 2005


After wrasslin' with javascript for a bit more, I've determined what I already knew: there's a reason the average programmer gets paid more than the average writer: Pretty much everyone can write a sentence that works, even if its crappy, but writing code that works at all, even if poorly, takes knowledge. Nothing I'm doing seems to be working, so I'm going to go back to writing stuff and leave the extension development to people who know what the hell they're doing.
posted by Bugbread at 12:56 AM on March 6, 2005


bugbread writes "I'm going to go back to writing stuff and leave the extension development to people who know what the hell they're doing."

Scripting languages are particularly hard, because you've not got a compiler to point out syntax errors. That javascript is typeless makes it even harder.

Don't take it too hard. Most of my coding is in compiled languages, and the compiler is my friend.
posted by orthogonality at 1:17 AM on March 6, 2005


"Me no like blockquote for single lines. And indeed, style manuals say blockquote is only for multiple lines."

True. But I think single-line or phrase quoting is serving a somewhat different purpose than typical quoting in this context. We normally don't quote very short things and instead address the point directly. However, in a format like this one, where there can be simultaneous conversations going presented linearly, the quote is (often) really a marker for a conversational thread more than. So I guess part of what I'm saying is that were it not for this strange format, we'd not be needing to quote very small snippets as often as we do.

Yet we do. I think another attribution style may be more appropriate for those. Perhaps something like:

I just forgot the quotes.

...just for small snippets serving the purpose I just described.

Multiline quotes, though, I think should be handled as I suggested earlier. It's true that some kinds of browsers, like cell phones and the like, may well not correctly display even common html entities like “. But they should. I want a unicode world, and I want it now. Yesterday, even.
posted by Ethereal Bligh at 1:39 AM on March 6, 2005


I should probably pop in to say that I've corresponded with TP Diffenbach, and he's very politely requested that I not go a'fiddlin with the code, which is fine by me. Good news is that he's working on a new version, and he's got his eyes on these threads, so some of the suggestions may go into effect. Probably it would be a good idea to make some clear, concise requests here. Also, note that he has indicated that he won't eliminate the link reference part.

My personal ideal preferred format, then, would be this:

Etherial Bligh: "I want a unicode world, and I want it now."

Agree or weigh in with your own preference, so he can get an idea of the general concensus (or, this being Mefi, lack thereof).
posted by Bugbread at 4:13 AM on March 6, 2005


My personal ideal preferred format, then, would be this:

Etherial Bligh: "I want a unicode world, and I want it now."


I think that doing it this way is kind of jarring visually. IF you go through MetaTalk for the last few weeks since the [!] was implemented, lots of people were complaining that the little yellow [!]'s were jarring, and I think this is the same thing.

Perhaps something more subtle (and thus fitting in with the overall style of the site) like

Etherial Bligh: "I want a unicode world, and I want it now." where something like the . is hyperlinked for convenience, but at the same time not as intrusive.

That being said, has anyone asked Matt about this? It seems like this is something that could be stepping on his toes, as he designed the place, and something like this alters the visual design a fair amount.
posted by Quartermass at 11:43 AM on March 6, 2005


That being said, has anyone asked Matt about this? - Quartermass

How about something like that? It seems less jarring to me than the current bookmarklet and everything proposed.
posted by mathowie (staff) at 12:02 PM on March 6, 2005


mathowie writes "the current bookmarklet and everything proposed"

What bookmarklet? I am confused.

To clarify, you find
That being said, has anyone asked Matt about this? - Quartermass

less jarring than:
Quartermass: That being said, has anyone asked Matt about this?

That's close to what Ethereal Bligh likes.

Do you find the use of quotation marks jarring:
"That being said, has anyone asked Matt about this?" - Quartermass

posted by orthogonality at 12:16 PM on March 6, 2005


And of course Matt really has ultimate control over this, as an examination of the MetaFilthy source code shows that it relies certain regular features of Metafilter's layout.

So Matt could break MetaFilthy any time he wanted to, and no one could blame him for failing to support a third-party tool.
posted by orthogonality at 12:22 PM on March 6, 2005


Should use <q> and <blockquote>, and use inline style attributes if the Mefi CSS is causing trouble.

Using <em> for quoting is silly; it's better to use <i>.
posted by Firas at 9:55 PM on March 6, 2005


When the Mefi code changes, Metafilthy will change too, I assume.
posted by Firas at 9:59 PM on March 6, 2005


Firas writes "Should use <q>"


Yeah, it should. But Mozilla's implementation doesn't nest, as w3c suggests. A <q> inside a <q> should switch from double quotes to single quotes.

Here, take a look at what your browser does with nested quotes:

Sally said, When Mike said Foobar!, I was offended!
posted by orthogonality at 10:05 PM on March 6, 2005


Use class=flag or inline style if the hyperlinks' jarringness is an issue.
posted by Firas at 10:08 PM on March 6, 2005


Hmm.. firefox just leaves them both as double quotes. I didn't know that it was generating quote marks around <q>!
posted by Firas at 10:11 PM on March 6, 2005


Anyway, if <q> isn't being used (and because inline style is just icky) then <i> should be.. using <em> is just wrong :)
posted by Firas at 10:14 PM on March 6, 2005


Sally said, When Mike said Foobar!, I was offended!

No quotes at all in IE. *retch*
posted by squidlarkin at 1:17 PM on March 7, 2005


Good idea.
posted by dfowler at 6:24 AM on March 23, 2005


« Older Could we get timestamps on our contacts?   |   Where's my newsfilter Newer »

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