Hack 34. Modify Tabbed Browsing
Customize the look and behavior of tabs to any degree.
Tabbed browsing is often touted as one of Firefox's killer features. Indeed, it's very useful, but the default preferences aren't perfect for everyone. That's OK, because Firefox offers plenty of preferences for customizing your tabbed-browsing experience. If you can't find what you want in the preferences, you can go a step further by installing one of the many Firefox extensions that can make minor alterations to your tabs.
Still not satisfied? The most aggressive of all the tab-related extensions, discussed at the end of this hack, completely replaces Firefox's tabs with its own.
4.3.1. Tabbed-Browsing Preferences
Firefox preferences allow you to control how tabs respond to certain types of events. Some of the preferences are easily set in the Preferences window, while others require you to use the special about:config page in the browser.
188.8.131.52 Links from other applications
When a link is sent from another application, such as when you click on a URL in an email, what should the browser do? There are three options: open the page in a new window, open the page in a new tab in the front window, or replace the current page in the front window.
The options for this behavior are shown at the top of the Tabbed Browsing panel in the Preferences window. If you ever feel the need to set this preference via about:config, look for browser.link.open_external. Setting this preference to 1 opens the link in the current tab and window, 2 opens it in a new window, and 3 opens it in a new tab in the front window.
184.108.40.206 Loading tabs in the foreground or background
There are three preferences that control whether new tabs load in front of the current tab or behind it. These preferences correspond to the three types of events that can open a new tab. Two can be set in the Preferences window (checked or true means "load in foreground"; unchecked or false means "load in background"), while the third requires the about:config page, described earlier in this hack:
220.127.116.11 Getting rid of tabs when there's only one
This preference hides the tab bar at the top of the set of tabs when only one tab exists:
browser.tabs.autoHide /* set to true to enable hiding */
18.104.22.168 Single Window mode
Do you hate it when links on web pages open new windows (because they set a target attribute on the link)? You can force Firefox to open those links in a new tab instead of a new window. This is called Single Window mode. It doesn't prevent all new windows, but it catches most of them. The radio buttons for setting this preference are in the Preferences window, but only if Firefox knows you want to see them. Go to about:config and set browser.tabs.showSingleWindowModePrefs to TRue. Figure 4-4 shows the items that are added to the Preferences window's Tabbed Browsing panel after making this change.
Figure 4-4. Single Window mode preferences for tabbed browsing
4.3.2. Extensions that Alter Tabbed Browsing
There are a number of Firefox extensions that interact with tabbed browsing. Two are designed to make it easier to set the preferences exactly how you like, and one adds some useful new features via the creative use of tabs and keystrokes. New extensions are being written all the time, so check the Mozilla Updates web site (http://updates.mozilla.org/) for the latest additions.
22.214.171.124 Tabbrowser Preferences
The Tabbrowser Preferences (TBP) extension (http://www.pryan.org/mozilla/site/TheOneKEA/tabprefs/), by Bradley Chapman, organizes all of the preferences related to tabbed browsing into a single pane in the Preferences window. You can set all of the same preferences via the special about:config page, but by using TBP, you don't have to remember what the different preference names mean or what value to set in order to get the behavior you want.
126.96.36.199 Quick Tab Pref Toggle
The Quick Tab Pref Toggle (QTPT) extension (http://jedbrown.net/mozilla/extensions/#QuickTabPrefToggle), by Jed Brown, allows you to maintain two sets of tabbed-browsing preferences. The idea is that you'll usually want to divert all new windows into new tabs, but occasionally you'll work with a page that really should pop up a separate window. This extension lets you put a small button (a toggle) in the toolbar to flip back and forth between two sets of preferences with a single click.
Magpie (http://www.bengoodger.com/software/tabloader/), by lead Firefox developer Ben Goodger, is not a tabbed-browsing extension per se, but it has a related feature that demonstrates a completely different use for tabs. Magpie can save all of the tabs to the right of the one you're currently viewing to files on disk. (It's intended for media files, such as pictures.)
For example, if you open a photo album web page that contains thumbnails of a dozen pictures, you could Ctrl-click (Command-click) each of them to open the full size photos in separate tabs. Then, a single use of Magpie's Ctrl-Shift-S would save all of those images to disk in a single folder and close the tabs. This is much faster than saving each image to disk one at a time.
4.3.3. Tabbrowser Extension: A Complete Tabbing Overhaul
The Tabbrowser Extension (TBE, http://piro.sakura.ne.jp/xul/_tabextensions.html.en), by Shimoda "Piro" Hiroshi, is a power user's tool. It's the super-ultra-deluxe tabbing system, with every feature you can imagine and a few you probably can't. TBE completely replaces the built-in browser tabs with TBE's own. Review the install notes and latest status, as TBE is still being polished and debugged as this goes to print.
TBE's tabs look just like the regular tabs in Firefox (by default, anyway) but offer lots of features you simply can't get any other way. In fact, TBE is so flexible that the Preferences window for tweaking its behavior has almost as many options as Firefox's own Preferences window! TBE allows you to do the following things:
TBE also supports plug-in modules of its own. You'll find these plug-ins and more listed at http://piro.sakura.ne.jp/xul/_tabextensions_modules.html.en: