Wed, 05 Sep 07

Patching the del.icio.us firefox extension to add permalinks

28-Apr-2009. This is now a firefox extension hosted at addons.mozilla.org.

I spent some of my train time today hacking around with the del.icio.us firefox extension. Although I’m sure it’s bad in many, many ways, I’ve managed to add the permalink functionality I mentioned yesterday. You can either apply the patch yourself, or download the patched jar file.

To apply the patch.

# Install Firefox extension 1.5.43
$ cd MY_FIREFOX_PROFILE_DIRECTORY # ~/Library/Application Support/Firefox/Profiles/RAND_CHARS.default for me
$ cd extensions/{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}/chrome
$ svn export http://chrisroos.googlecode.com/svn/trunk/delicious_url_tags/delicious-extension-url-tag.patch
$ unzip deliciousBookmarks.jar
$ rm deliciousBookmarks.jar
$ patch -p1 < delicious-extension-url-tag.patch
$ zip -r deliciousBookmarks.jar content/ locale/ skin/ 
$ rm -rf content/ locale/ skin/
# Restart Firefox

To use the patched compressed file

# Install Firefox extension 1.5.43
$ cd MY_FIREFOX_PROFILE_DIRECTORY # ~/Library/Application Support/Firefox/Profiles/RAND_CHARS.default for me
$ cd extensions/{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}/chrome
$ rm deliciousBookmarks.jar
$ svn export http://chrisroos.googlecode.com/svn/trunk/delicious_url_tags/deliciousBookmarks.jar 
# Restart Firefox

Now, anytime you bookmark a site, the tags field will be pre-populated with a url-tag (“url/MD5_OF_URL”). Cool huh. Oh, and the patched extension uses this javascript md5 library.