I have finished updating the toolbar tutorial here at the site. Chapters 6 through 8 have been polished, and all the appropriate downloads and sample files have been updated as well. Again, if you spot an error with these updates, please let me know.
I have started making updates to the toolbar tutorial here on the site. So far, chapters 1 through 5 have been updated. Here’s a brief rundown of what has changed:
- The downloadable version of the toolbar has been updated (though the GitHub repo has yet to be updated)
maxVersionhas been bumped to 99.*
- Markup for the toolbar (in chapter 3) has been updated in several places
- An image sheet is now used in the skin for the toolbar, and all the appropriate style changes have been made to support this; see chapter 5 for details
- A number of links have been updated
As a result of this first phase of the update, chapters 6 through 8 are now out of sync. I hope to finish these updates later this weekend, but it may be early next week before I can get to it. If you spot any errors in these updates, please leave a comment to let me know.
As an aside, I will be updating portions of the tutorial over the coming days and weeks. There are sections of it that are now out of date, and I would like to improve the UI of the toolbar. Updates have already begun (I’ve cleaned up the first two sections), so stay tuned for improvements to this resource.
The Firebug extension is a very helpful tool for web development. But did you know that you can use its console as an output target for your Firefox extensions? It’s pretty simple to do:
Firebug.Console.log("Text to log"); // Output text Firebug.Console.log(myObj); // Output an object
Adblock Plus is a terrific extension for Firefox, along with the EasyList rule set. One minor problem I’ve run into recently, however, is that EasyList blocks the automatic package-tracking links that appear in the sidebar in GMail (when viewing emails that contain a tracking number). I found the offending rule in the list and disabled it, allowing me to get my links back. Here’s how to do it:
- Open the Adblock Plus Preferences dialog (Tools » Adblock Plus Preferences)
Ctrl + Fto open the find bar
- Search for the following text (only one rule should match it):
- Disable said rule
The entire rule looks like this, in case you’re curious:
One of the recent updates to Firebug broke a “feature” I used all the time: the ability to select a link with the element inspector, then edit that link’s
:hover pseudo-class style rules. Well, it turns out that technically, that “feature” was a bug (though I might argue against that fact). In newer versions of Firebug, you have to:
- Click the element inspector
- Click the link you’re interested in editing
- Select the
:hoverpseudo-class menu item in the Style tab’s drop-down menu
- Edit the rule as you like
This new option allows you to “lock” the element in the
:hover state, the usefulness of which I can understand. At the same time, it would be great to have an option (perhaps a hidden preference) to bring back the old behavior.
It appears that Microsoft is quietly slipping in a Firefox extension with updates to the .NET framework. The extension is named “Microsoft .NET Framework Assistant” and, based on the description, “Adds ClickOnce support and the ability to report installed .NET versions to the web server.” According to reports, this extension:
- Cannot be uninstalled through Firefox
- Changes the Firefox user-agent string
- Does God knows what else
Happily, people have figured out how to uninstall the extension. This move seems pretty dirty to me, but Microsoft has been pointed in this direction for some time now. If you find yourself ‘infected’ with this piece of malware, do yourself a favor and remove it.
Firefox 3 will include several heavy-hitting changes to extension development, some of which will cause existing extensions to break. Let’s take a look at what’s changing, to get an idea of what to expect from a development point of view:
One big change that will likely break some existing extensions are the new Firefox APIs being introduced in 3.0. All of the bookmark and history APIs are changing radically, with the introduction of the new Places architecture. As such, any extensions that make use of these will need substantial work to run properly in Firefox 3. Similarly, any extensions that use the Password storage functionality in Firefox will need changes (a new login manager will be used to handle stored passwords). It remains to be seen how one will develop an extension that will be compatible across all versions of Firefox. I haven’t seen any mention of simply deprecating the existing API calls, though I would hope that’s what the developers would do.
Firefox 3 will require that all extension updates be provided over a secure channel, to avoid man-in-the-middle attacks. This means that if you are not using the official addons.mozilla.org website to host your extensions, you must provide your own secure method of distributing updates. One has several options for doing this:
- 1. The
updateURLmust either use https or not be provided at all.
- This method assumes that you either host with the official site (thereby not using an
updateURLvalue at all), or you are willing to host your extensions from a secure location using https. The latter option will likely cost you money, while the former forces you to use a website beyond your personal control.
- 2. The
updateURLuses http and the
updateKeyentry is specified.
- This second option seems a little easier to swallow, though it will involve a little extra effort on the behalf of extension developers. First, an
updateKeyvalue must be provided in your extension’s install.rdf file. Second, a digital signature must also be included in the update manifest; otherwise, the update will be rejected. Your
updateLinkvalue can either use https, or it can use http while providing an
updateHashvalue can be generated using either a sha1, sha256, sha384, or sha512 hash algorithm. But take note: you should not use sha384 or sha512 as of this writing. This forum thread mentions bug 383390, in which both sha384 and sha512 values are incorrectly truncated by Firefox 2.x (making backwards compatibility a problem).
Some further information about this new signing process can be found here.
The two items above aren’t the only changes coming down the pipeline for extension development, but they are the largest changes that I can see. A document detailing the new items is available, and should (hopefully) be updated as 3.0 nears an actual release date. It looks like extension developers will have a fair amount of work coming up, but I think these changes will be beneficial in the long run. How well the community accepts these changes remains to be seen.
The official 1.0 release of Firebug is now available. If you are a web developer, be sure to pick up this super-ultra-mega-cool extension. You’ll thank me later.
I recently stumbled upon what might be the greatest Firefox extension of all time: Firebug. This extension is aimed squarely at web developers and includes a number of mind-blowing features. And I mean mind blowing. Before reading any further, take a look at this short screencast of Firebug in action. Just make sure that you hold on to your socks.
How did I survive this long without this tool? And why haven’t we had something like this all along? Firebug single-handedly obsoletes the DOM Inspector extension that ships with Firefox, and nearly obsoletes the mighty fine Web Developer extension that I have relied on for so long. I can now view exactly what my CSS is doing. I can peruse through my page’s DOM without opening up the DOM Inspector and switching between windows. I can even edit the CSS and HTML for a page in real time; no reloading necessary! Want to watch your AJAX code in action? Firebug makes it easy.
This tool feels so incredibly polished, and the user interface is so streamlined, that I barely even notice that I have it installed. And it weighs in at an extraordinarily small 288 KB (as of this writing). I cannot say enough good things about this extension; just download it and give it a try. You will not be disappointed.