Posts Tagged "firefox"

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)
  • The maxVersion has 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.

Toolbar Tutorial Repo

April 9, 2014

I have created a repository at GitHub to host the source files for the toolbar created in the toolbar tutorial. This should hopefully make it a little easier for people to fork the project.

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.

Firefox 29, the next version as of this writing, will bring with it a brand new interface called Australis. This interface is changing loads of toolbar structure, which may negatively impact Googlebar Lite.

I’m posting this warning ahead of time to let you know that I will definitely work towards making Googlebar Lite compatible with this new theme. However, doing so will take some time and effort. As such, don’t be surprised if support for this new theme isn’t immediately available. I may have to bump the minVersion of whatever new version I release to 29.0, in order to prevent breakage in older browsers.

Until I set up a development sandbox with the latest build, I won’t know how bad the breakage will be. Until then, please be forewarned that there’s some turbulence ahead.

In recent times, Mozilla has deprecated the nsIFormHistory2 and nsIFormHistory interfaces (see bug 878677 for more information), replacing both with the FormHistory.jsm module. This module provides an asynchronous way to store form history items, which is good for performance. Like many of the Mozilla interfaces, however, documentation is nearly non-existent. I like learning by example, and I’ve figured out how the FormHistory module works. Here are a few examples showing how to use it:

// Import the module
Components.utils.import('resource://gre/modules/FormHistory.jsm');

// Remove all stored history for a specific field
// ('GBL-Search-History' in this example)
FormHistory.update({op: "remove", fieldname: "GBL-Search-History"});

// Add specific terms to a specific field
FormHistory.update({op: "bump", fieldname: "GBL-Search-History", 
                    value: termsToStore});

Update: This article previously indicated to use the add operation to add a term to a specific field. That function, however, will result in duplicate entries as of this writing. The bump operation is now what I recommend to use. End Update

As you can see here, the update() function is the one I most care about. This function has several operations (specified by the “op:” property above) available to it:

  • add
  • update
  • remove
  • bump

The header comment in the FormHistory.jsm file details the specifics for these operations, as well as other functions. Hopefully these simple examples will help someone out. It wasn’t immediately clear to me how to use this module when I first switched over.

By default, Firefox ships with the Use hardware acceleration when enabled option turned on. Unfortunately, Firefox has a number of font rendering bugs under the hardware acceleration umbrella (the following are a select few):

As a result of these bugs, I’ve run with hardware acceleration disabled on my personal systems for quite some time. This, however, has resulted in an unforeseen consequence with my web development. The apps and pages I’ve developed look great in every browser, except stock Firefox! I only recently ran into this issue when I re-enabled hardware acceleration on my work laptop (in the process of creating a new profile). To my horror, several sites I had developed looked pretty terrible, my photo site being one among them.

I have since rolled out an updated stylesheet to my photo site, fixing the problems that showed up in stock Firefox. It should (hopefully) still look alright in all other browser variants (if you spot a bug, let me know). It’s worth knowing, however, that enabling hardware acceleration in Firefox is a worthwhile thing to do if you develop things for the web. The underlying bugs in the rendering engine may bring out underlying flaws in your design.

Comments Off Tags: ,

Logging to Firebug From XUL

January 23, 2013

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

Is that easy or what? Having this capability is a great way to print out JavaScript objects from your Firefox extensions, making your debugging life much easier.

Comments Off Tags: , ,

Using the nsIFind Interface

October 3, 2011

In a recent update to Googlebar Lite, I made a number of improvements to the search term highlighting feature, fixing several bugs along the way. This feature uses the nsIFind interface available in Firefox, which is poorly documented in my opinion. Unable to find any decent examples, I picked apart another extension I found that uses this interface, and I now better understand how it works. As such, I thought I’d provide an example of how to use this interface so that future developers won’t have to dig down in the source like I did.

Read the rest of this entry »

As I tweeted recently, Firefox 4 is to the 3.x line what Windows 7 is to Windows XP. It really feels like a worthy successor in so many ways. Tabs on top is a great enhancement, and I especially like the tabs-in-the-title-bar approach. I’m really able to maximize my screen real estate with these options. Surprisingly, I don’t miss the status bar or menu bar as much as I thought I would (and yes, I know the menu bar is still present; I’ve simply chosen to turn it off). The orange “Firefox button” is a little strange, and takes some getting used to, but I can live with it.

The biggest improvement in my eyes is the ability to pin certain sites as “app tabs.” Currently, I have GMail and Twitter pinned open. I am the world’s worst at closing Firefox down completely at various points during the day. I don’t know why I do this, but knowing I have some app-tabs open will hopefully help me break this terrible habit. One other great improvement worth mentioning is start-up time, which is notably faster. They’ve really caught up to (though not surpassed) Chrome in this regard, which has always been lightning fast to boot up. Hopefully this trend will continue.

Comments Off Tags:

No Status Bar in Firefox 4

January 27, 2011

One of the strangest decisions (among many) made in Firefox 4 is the removal of the browser’s status bar. No longer can users glance down at the bottom of the screen to see where a particular link will take them. Instead, this information is displayed on the right side of the URL bar in a surprisingly low-contrast font (how are low-vision users supposed to cope with this?). I cannot think of a single application, in Windows or otherwise, that exhibits this behavior.

Removing the status bar from Firefox completely changes the standard windowing paradigm. I’m all for maximizing vertical real estate, but I really think they should have copied Chrome and made the status bar invisible, showing it only when necessary. Besides, gaining 20 pixels or so isn’t that much of a real estate win.

I’ll be interested to see if this decision, along with a few other similar changes (removing the menu bar by default) impacts Firefox’s usage rate, if at all. I can’t imagine too many corporations will adopt Firefox 4 out of the gate due to changes like this, but perhaps my perception is too closed minded. What do you think about these changes? Are you willing to put up with them, or will you use a different browser?

Comments Off Tags: