1.2. Get OrientedBefore starting our journey, there are a few things you need to know: how to find Firefox files, how to install an extension, and how to set a preference. You don't need this information to read a web page, but it's vital for most of the hacks in this book. 1.2.1. Finding Firefox Files After InstallationAfter installation, Firefox puts its files in two important directories. The first is the install area, also known as the application area, which gets the general-purpose bits, such as the Firefox programs themselves. The second is the profile area, which gets user-specific information, such as bookmarks. Table 1-1 lists the default locations of these two areas on different operating systems.
Feel free to have a (careful) look around in these directories. 1.2.2. Installing an ExtensionExtensions are small enhancements to Firefox that are added optionally and separately to the main browser install. Just as plug-ins, such as Apple's QuickTime, enhance the display of web pages with special content, extensions enhance the display of Firefox's user interface with extra commands and extra windows. You install an extension when you need an extra feature. You can install extensions from the official http://update.mozilla.org web site or from any web site that offers a .xpi file. Such files almost always hold one extension each. If you choose to install an extension, you are acting like a power user rather than a beginner, so you have to use your judgment to decide what extensions will be useful to you. It's no use complaining that Firefox is too complicated if you have 10 or 20 extensions installed. Just remove them and resimplify your life. 1.2.2.1 Installing from update.mozilla.orgThe Advanced Search Button extension (found in the Search Tools category at http://update.mozilla.org) is a harmless extension to experiment with. Here's how to get it. After browsing to it on the update site, click on the matching install link. Sometimes there's a brief pause, and then Firefox presents an acknowledgement window. After another brief pause, Firefox enables the buttons in that window, asking you whether to proceed. In this case, go ahead. Once the user agrees, Firefox downloads and installs the extension.
If you choose Tools The sample extension, Advanced Search Button,
doesn't change the Firefox user interface much at
all. All it does is offer you a new toolbar icon. Choose
View 1.2.2.2 Installing from elsewhereBy default, the Mozilla Update site (update.mozilla.org) is the only trusted web site for extensions. If you attempt to install an extension from another web site, Firefox will complain and ask you to provide extra permission. The complaint appears as a yellow information bar at the top of the page. Figure 1-1 shows this complaint for the version of the EditCSS extension that is available at http://editcss.mozdev.org. Figure 1-1. Extension warning info bar for untrusted windows![]() If you click the Edit Options... button, a dialog box appears (shown in Figure 1-2), where you can add the web site to a whitelist of trusted sites. That has to be done at your discretion. Figure 1-2. Extension web site whitelist dialog box![]() If the web site is added and the dialog box acknowledged, you're then sent back to the extension installation page. You have to click the extension's link a second time to restart the installation process, with trust now in place. From here, installation proceeds as explained for the Mozilla Update case. 1.2.3. Setting a Preference with about:configA
preference
is a user choice that affects
how Firefox runs. Firefox has
hundreds of preferences. The Firefox Options Dialog box, under
Tools All you really need to know is that if you right-click (Command-click on a Mac) in the list of preferences, you can change the preference under the mouse or add a new one. To change an existing preference, choose one of the following items from the context menu:
To add a new preference, choose the New context menu option and follow these guidelines:
After setting the preference, it appears in bold (unless you reset it). The about:config list is sorted alphabetically, so you might have to scroll a bit to see what you've added. Preference changes take effect immediately in most cases. That's all the warm-up you need. Now, let's hack. |