O'Reilly logo

Firefox Hacks by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #75. Do Groundwork for Ugly Chrome Hacks

Learn the first steps required to modify Firefox without using formal release processes.

At the base of Firefox is an efficient and unchangeable runtime engine. On top of that is a thick layer of interpreted content. That thick layer of content is human-readable and human-changeable. This hack describes how to find, open, and modify these files without getting burnt and without preparing an extension.

Files centrally associated with the chrome are found in the Firefox install area. Because these central chrome files aren't implemented as extensions, the -safe-mode command-line option [Hack #10] doesn't apply. If you damage chrome files, there is no way to successfully restart Firefox without repair or reinstall. You've been warned.

Understanding Chrome

The chrome represents the entire user interface that Firefox has to offer. That's a collection of XUL, CSS, JavaScript, image, RDF, plain text, and HTML documents. RDF [Hack #70] and XUL [Hack #68] are the most important document types. The chrome appears in several concrete ways.

First, the chrome is a little database of information held in Firefox's memory. This database is created at startup time from many separate RDF files. Only those pieces of user interface that are known to this database are considered chrome. RDF package registration is required to make a package known. You can't place a file in the Firefox install area and expect it to be treated as chrome unless it is part ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required