User:Clarkbw/Bugzilla Link Grabber Extension
What is This?
This is an extension I wrote on Thursday April 3rd 2008 for Thunderbird. The extension looks at the mail in thunderbird's message pane munging bugzilla links and references.
The extension converts in two ways:
- converting long bugzilla links to short form
- e.g. http://bugzilla.mozilla.org/show_bug.cgi?id=XXX to <a>bug XXX</a>
- these bug links will always be the correct link
- converting bug shorthand notation into links
- e.g. bug XXX into <a>bug XXX</a>
- these bug links use the default bugzilla urls and can sometimes be incorrect
The extension has 2 bugzilla system urls included by default
Mockups
Screenshots
Where can I get it?
How to Install an Extension in Thunderbird
- Right-click the link below and choose "Save Link As..." to download and save the file to your hard disk.
- In Mozilla Thunderbird, open Add-ons from the Tools menu.
- Click the Install button, and locate/select the file you downloaded and click "OK".
- Extension (for now)
- bugzillalinkgrabber.xpi
Will you be adding this Feature?
Right now this works just about as well as I'd like it to. The source code is completely available and I'd love to see people try out different things. Don't ask me if you can do something, just go try it. If you want to try something but aren't sure what to do, see the TODO below or ask me for some ideas.
Can you package this up for AMO?
I have no idea how to do that. If you do then I'd love to see you take over that part of the project, just send me an email or write in the Talk for this page.
TODO
There are lots of things to get done, these are the ones that are on my radar.
I10n
This needs some work and I didn't get a chance to figure out how to fix it. If you know what you're doing with that then grab the source, fix it, and send patches.
Make Preferences Window useful
Right now the preferences window is just junk that came with the extension. The purpose of the options is to allow people to add and remove bugzilla URLs to help customize the plugin to their needs.
Here's some simple ASCII art of how it could look.
+----------------------------------------------------------------------------------------+ | +--------------------------------------------------------------------------------+ | | | name | url | | | | bugzilla.mozilla.org | https://bugzilla.mozilla.org/show_bug.cgi?id=%s | | | | bugzilla.gnome.org | http://bugzilla.gnome.org/show_bug.cgi?id=%s | | | | bugzilla.freedesktop.org | http://bugzilla.freedesktop.org/show_bug.cgi?id=%s | | | | | | | | +--------------------------------------------------------------------------------+ | | [ add ] [ edit ] [ remove ] [ close ] | +----------------------------------------------------------------------------------------+
There should also be a way to set the default bugzilla
Get the Context Link Menu Working
The point of the right click context menu is that every "bug ###" text gets linkified to your default bugzilla URL. However sometimes the bugzilla you want is actually another one. We can list the alternate bugzillas in the context menu allowing you to choose the correct one apart from the default.
+------------------------+
| Copy Link Location
|------------------------|
| Save Link Target |
|------------------------|
| Open Bug in Bugzilla > | +--------------------------+
+------------------------+ | bugzilla.mozilla.org |
| bugzilla.gnome.org |
| bugzilla.freedesktop.org |
+--------------------------+