Monday, April 27, 2009

Ubiquity - Bugmenot command

I like to use BugMeNot when trying to access some websites which require registration, most frequently the New York Times.

Bugmenot has a bookmarklet, but it opens a new window, and is therefore slow, and you have to copy and paste login information yourself.

Ubiquity is a command line interface to various things for Firefox.

I've created a Bugmenot command for Ubiquity.

Simply execute bugmenot while viewing the desired login page, and the top-ranked Bugmenot entry will be populated and submitted.

If that login has expired, you can specify an entry number as a parameter, from the list of entries in the Ubiquity preview pane.

Get it at

Some code was borrowed from Onur Yalazı and Brandon Goldsworthy.

7/9/09 update: Updated to support Ubiquity's Parser 2. The old code is still available here.

Friday, January 2, 2009

Fix for Firefox’s Password Exporter Add-on

7/23/09 Update: Updated to be compatible up to Firefox 3.5.1.

1/8/09 Update: If you tried installing the .xpi and got “Firefox could not install the file at [...] because: Not a valid install package -207,” please see the revised download instructions below.

I like Firefox’s Password Exporter Add-on, but recently I noticed a bug with version 1.1 (released January 5, 2008) when importing into Firefox 3. Several entries return the following error:

'Can't add a login with both a httpRealm and formSubmitURL.' when calling method: [nsILoginManager::addLogin]

I’ve posted the .xpi at (90.1KB).

Right-click and Left-click this link, which should prompt Firefox to download to your machine. My web page does a redirect, so right-clicking directly actually saves an intermediate web page, which is not what you want. If in doubt, make sure file size is correct. Drag to a browser window to install.

Here’s the diff, in case you are queasy about installing my unsigned version.

Within the file chrome/content/passwordexporter.jar, in the file content/pwdex-loginmanager.js,

< var bogusLoginInfo = new nsLoginInfo(entries[i].hostname, 'http://passwordexporter',
> var doModify = false;
> var formSubmitURL = entries[i].formSubmitURL;
> if (formSubmitURL) {
> formSubmitURL = '';
> doModify = true;
> }
> var bogusLoginInfo = new nsLoginInfo(entries[i].hostname, formSubmitURL,
< loginManager.modifyLogin(bogusLoginInfo, entries[i]);
> if (doModify) loginManager.modifyLogin(bogusLoginInfo, entries[i]);