I see he's using Ajax to call his API to unshorten the URL. This is fine, but wouldn't it be faster (and less load on his server) if the JavaScript tried to follow the link directly, and looked at the Location header in the response? Or can't you do this using JavaScript?
Cross-domain ajax technically doesn't exist, and when it does (via hacks), the target domain sorta needs to know it's responding to a hackified remote javascript request.
edit: This might've been relevant if we weren't discussing an add-on. Nevermind...
Why exactly does this need to be a full-on Firefox extension rather than a GreaseMonkey script? As a GreaseMonkey script users can use it on multiple browsers...
I don't think greasemonkey is as easy for my grandmother as a plugin - yeah I know my grandmother might not care about seeing the long url (or know what one is) but the premise is the same FF plugins are easier than greasemonkey... for the average user
You have to restart Firefox to install / enable / disable extensions -- with Greasemonkey you only have to do that once. You also don't have to deal with addons.mozilla.org and their wanky policies.
Poor analogy. Assembly is a magnitude 'harder' than C and they are different languages. Firefox extensions are written in XUL which is Javascript+XML last I checked. GreaseMonkey scripts are also written in Javascript.
My point was that this is a 'simple' hack and by keeping the solution simple (i.e. a GreaseMonkey script) users of multiple browsers can benefit. Claiming that writing for GreaseMonkey instead of writing for the Firefox Extension 'Framework' is the same as going from C back to ASM is disingenuous (and from my point of view a straw-man).
{edit} Personally for 'simple' things like this that just modify the display of the page and don't require significant user interaction (i.e. a preferences pane) I don't feel like there is a need to create a Firefox extension. There are obviously instances were Firefox Extensions are the correct option, especially when you're talking about modifying the behavior of Firefox (like the MAFF extension or the one that tells you Firefox to also save the stylesheets when saving the 'Complete Webpage'), but things like "replace all the URLs on the page with X" or "click on the image to expand it inline instead of opening up the larger image in a new tab/window" are more suited to a GreaseMonkey script (especially since a wider userbase can take advantage of them) IMO. {/edit}
Anecdote: When I worked on the Obama campaign during the California primaries we wanted to try something radical. Everyone in Democratic races uses something called VoteBuilder.
It's this big, ugly proprietary thing written in ASP or something like that. Usually a select few have access to it and they manage everything: building walk lists, cutting turf, call lists, etc. Precinct captains and other volunteers below that level go to their coordinator to get printouts of all the relevant data.
In the CA primary we decided to open it up and give precinct captains access so they could manage it themselves. VoteBuilder wasn't designed for this, of course. In fact, it frequently crashed due to the "heavy load" we placed on it. 20 simultaneous users? You must be crazy!
Anyhow, this meant that we needed new features to control for privacy and such. The code wasn't available so we wrote GreaseMonkey scripts that helped us do things like create accounts en masse.
These are all tech savvy people. Twenty-something, uses Facebook, Twitter, has an iPhone, etc. Let me tell you: GreaseMonkey is not easy. It's hard to get it working right and nobody understands it.
If you're an engineer it makes perfect sense: a bit of Javascript that is executed in the context of certain pages, which gives you total control over the underlying website. For everyone else we just had to explain, step-by-step, how to get everything working.
My point is that "just use GreaseMonkey" is not a realistic solution. It's like a Mac vs. Linux. Under the hood they're very similar, but would you rather manage ethernet cards by modprobing the right kernel driver, or having it "just work?"
Both have the same result, but one has a much, much, much, much (10 more much's) steeper learning curve.
If you're bothered by HN commenters who use URL shortening services, then this is the extension for you. Disclaimer: I didn't write this; I'm just sharing it to ease the pain.
I believe those HN users are annoyed that their paragraphs are taken over by 200-character URL strings, when they should be at most parenthetical to the discussion at hand--they are references to further reading, after all. Why does HN not allow titled links? If it's a matter of the possible syntax interfering with normal discourse, Markdown's footnote-style "reference link" specifications[1] are very unobtrusive and degrade gracefully (in fact, you're seeing the degraded version of a [modified] one in this very post!)
Ooh, forgot about that. :) Still doesn't help with the URL text interrupting the flow of prose, though. What's so wrong with having to hover over links to find out where they go?