GNOME Bugzilla – Bug 599249
Add support for packaging Splinter as a Firefox extension
Last modified: 2018-08-17 19:12:21 UTC
If Splinter is packaged as a Firefox extension it could work with any Bugzilla installation. I'm not sure if it's entirely sensible but if nothing else it makes it easier to test without the having to set up the proxy server. The extension packages up the resources into a chrome jar so that Splinter can be accessed from chrome://splinter/content/index.html. As the pages are part of the chrome it doesn't have cross-site restrictions. The extension also adds links next to the attachments to start the review. The extension can be built with 'make splinter.xpi'. The patches are also on a tree here: git://git.busydoingnothing.co.uk/splinter.git
Created attachment 146000 [details] [review] ffaddon: Add a build rule to generate a .xpi file This creates an zip containing the web files. An install.rdf and a chrome manifest is added to make it function as a Firefox addon.
Created attachment 146001 [details] [review] Prepend configBugzillaUrl to all XML request URLs This is needed to work with the Firefox extension where the Bugzilla will not be located relative to the review page.
Created attachment 146002 [details] [review] parseDate: Accept timestamps with a missing timezone Some Bugzillas don't add the timezone to timestamps. In this case parseDate will now assume the timezone offset is 0 which is not ideal but it at least prevents the script from failing.
Created attachment 146003 [details] [review] ffaddon: Add a config.js file This is currently hard-coded to use the OpenedHand Bugzilla. Ideally it would prompt the user to enter a Bugzilla address.
Created attachment 146004 [details] [review] ffaddon: Make the Bugzilla URL a parameter instead of a config option If the Bugzilla URL isn't specified in the config it will now prompt the user for the address. The address is then encoded as a parameter to the Splinter URL and it is passed from page to page.
Created attachment 146005 [details] [review] Use newPageUrl instead of configBase for the 'your reviews link' Otherwise it won't copy across the Bugzilla URL when Splinter is being used as a Firefox extension.
Created attachment 146006 [details] [review] ffaddon: Add a browser overlay to add review links This listens for DOMContentLoaded events in pages. If the page looks like a Bugzilla show bug page it grabs the attachment table and adds links to the last column in each row.
git-bz saw its last code changes in 2009: http://git.fishsoup.net/cgit/splinter (There seems to also be a fork at https://github.com/bugzilla/extensions-Splinter which could be more up-to-date.) GNOME is moving from Bugzilla to GNOME Gitlab. Closing this report as WONTFIX as part of Bugzilla Housekeeping. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as Bugzilla is deprecated) if active development is about to take place again.