Blog

Blog

Splinter as a Firefox extension

Posted at 13:21 on 23 Oct 2009

If you haven't noticed it on bugzilla.gnome.org already, Splinter is the nifty patch review system created by Owen Taylor. It allows you to view a patch as a side-by-side diff and insert comments directly inline with the code. The comments are stored as regular Bugzilla comments that are meant to be readable by both computers and humans.

The package is implemented entirely with client-side Javascript which does XML requests to Bugzilla using existing API. The only server-side code is a Bugzilla extension to add links inside bugs to start Splinter. As it is mostly client-side, I thought it would be fun to try packaging it as a Firefox extension so you can use it with any Bugzilla. The results are on a bug post here:

https://bugzilla.gnome.org/show_bug.cgi?id=599249

or you can install it directly from here:

http://www.busydoingnothing.co.uk/splinter.xpi

The extension works by packaging all of the Javascript and HTML from Splinter into a Chrome jar. There are some minor tweaks to the Javascript so that it doesn't depend on the Bugzilla URL being relative to the Splinter installation. There is also an overlay to insert 'Review' links next to attachments in pages which look like a Bugzilla installation.

I'm not sure whether it's entirely sensible to use it on a Bugzilla that doesn't have Splinter installed natively because it may confuse other people reading the bug report. However it does provide an easy way to play with Splinter for example on landfill.bugzilla.org and at least the reviews should be readable without Splinter.