Monthly Archive for May, 2010

addon roundup

I thought I’d make some xpi’s available for some of the addons I’ve been working on, and while they are all available in either bitbucket or hg.mozilla.org, sometimes a xpi is just easier.  They will be released onto AMO soon, but for the adventurous out there here’s the links:

Available on AMO now:

Mailing list filter: Auto filter your email lists into search folders, and optionally create real folders to get them out of your inbox.

Bulk list filter: Auto filter a bunch of common site notifications into some search folders

Experimental:

These are not officially released, may not even work for you, they are here for the adventurous.  If you install these, you will have to uninstall them later to update.

Attachments: an experiment at searching and viewing attachments, currently consumes lots of cpu on accounts with large amounts of email.

Thunderbird Sync: Same as Firefox Sync (aka Weave) but for Thunderbird, and adds sync for Address Books. Requires the install of two addons, weave-ext and weaver.

Contacts for Thunderbird: A snapshot of Contacts addon for Thunderbird, requires the install of oauthorizer and Contacts.

Overview: An addon from David Ascher that gives a summary page on folders, I cleaned up a couple things and here is the result.

now I can find that freaking attachment!

Update: I’ve made the attachments viewer available on AMO

Here’s a small addon for Thunderbird that provides an attachment search.  It shows you the actual attachment (if it’s an image), and searches across all your (gloda indexed) folders.  You can search by attachment category or using a full text search.

authorization and contacts

I’ve gotten a bit further with my OAuth addon, and now have a couple of the Contacts importers working with it in Firefox and Thunderbird.  For more information about the OAuth addon, see some of my older posts.

Initial authentication for OAuth:

Authorizing the addon:

The result in Contacts:

my Saturday of OAuth

Since I’m home alone, thought I’d work today on some more OAuth.  I’ve been working on an addon for Thunderbird that handles OAuth, primarily for use with Contacts but I’m sure it will come in handy elsewhere.  The authorizer addon is meant to help other addons transparently use OAuth, and it does so by requiring only a couple lines of code:

let provider = 'google'
let [key, secret, params] = [myKey, mySecret,
                             {'extra':'params', 'scope':'something'}];
function testCallback(svc) {
dump("*********FINISHED**********\naccess token: "+svc.token+
     "\n  secret: "+svc.tokenSecret+"\n");
}
OAuthConsumer.authorize(provider, key, secret,
                        testCallback, params);

That’s all folks!

Given your keys for any OAuth provider, all the user interaction is handled for you. After your app or addon is authorized, the access tokens are stored in prefs and the user doesn’t need to authorize again. I have not worked out expiration of that yet, some work is still necessary.

If they haven’t already logged into the service, they will get a login form:

Once they have logged in, they have to authorize the application:

Now after agreeing, for most desktop apps, the user would have to copy a code and paste it into the app.  For this addon, I’ve worked around that step by catching a redirect in the browser.

You’ll notice lots of white space.  I’ve tried to get a size for the dialog that fits most OAuth providers (or at least the few I’ve implemented).  Unfortunately there is no standard in what the providers display.  But it works, looks decent.  You may also notice in the status bar that the user gets some indication of SSL security.