Born Geek
Posts Tagged "firefox"

Sunset of Googlebar Lite

April 6, 2017

As of today, I am officially withdrawing my development support for the Googlebar Lite Firefox extension. I’m aware that the extension no longer works well in the latest builds of Firefox, and I have absolutely no desire to fix them. Mozilla’s development environment has gotten pretty irritating as of late, and I just don’t have the cycles (or the drive) to fix the issues that exist.

The future of Firefox add-ons lies in WebExtensions, and toolbar support in that arena is pretty bare-bones (last I looked). The default Firefox search box meets most needs, which has motivated me to drop this extension.

For those that are so-inclined, I will accept pull requests at the official googlebarlite repo. Or, you can fork the project and roll your own.

Electrolysis Growing Pains

January 15, 2015

In their march to copy Google Chrome, Mozilla is moving Firefox to a multi-process architecture. The code name for this project is Electrolysis. As of this writing, this project’s integration target for released levels of Firefox is at the end of 2015. Dates can always slip, and are likely to, but that target seems real soon now.

Frustratingly, Mozilla has been surprisingly quiet about this upcoming change, at least from a developer standpoint. For months the Mozilla Add-ons Blog has promised upcoming articles on the changes necessary for add-on authors, but as of this writing, nothing has appeared. What documentation does exist is, as usual, poorly written. The examples they provide aren’t real-world enough for me to fully understand.

It frightens me that Mozilla should be so lackadaisical about evangelizing these changes. This architecture shift will affect the vast majority of add-ons in one form or another. I verified tonight in a nightly build that both Googlebar Lite and CoLT are affected by this change, the former being broken in a number of areas. It seems to me that Mozilla should shift their evangelism of this new architecture into high gear. Every developer who cares about application compatibility needs to be working on these changes sooner rather than later; otherwise, a ton of add-ons won’t work properly come release day.

Firefox Extension Utilities

April 28, 2014

I have created a GitHub repo storing several Firefox extension utility scripts that I wrote. Here’s the rundown on what this repository contains:
Compares all of the locales it finds against a “master” locale (`en-US` by default) and reports the number of exact duplicate entries for each. This is useful for figuring out which locales have not been updated.
Converts a given list of locale entities into corresponding properties. Handy for migrating existing entity localizations into a `.properties` file.
This script removes a given list of entries from all of the locale folders it finds in the current working directory and below. Useful for cleaning up strings that are no longer needed.

Hopefully others will find these scripts to be useful. I hope to add additional scripts to this repository over time.

Toolbar Tutorial Updates: Phase 2

April 19, 2014

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.

Toolbar Tutorial Updates: Phase 1

April 18, 2014

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.

Australis to Cause Problems

March 19, 2014

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.

Using the FormHistory Module

March 4, 2014

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

// 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.

Font Rendering & Firefox Hardware Acceleration

April 11, 2013

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 on Font Rendering & Firefox Hardware Acceleration 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.