This page contains various tips and tricks for Firefox. Most of these tips involve editing of text files on your hard drive and is not recommended if you're not familiar with basic file and folder usage. The tips are divided into four categories and sorted by importance/popularity.
/* Make menus XP style */
menupopup, popup {
border: 1px solid ThreeDShadow !important;
-moz-border-left-colors: ThreeDShadow !important;
-moz-border-top-colors: ThreeDShadow !important;
-moz-border-right-colors: ThreeDShadow !important;
-moz-border-bottom-colors: ThreeDShadow !important;
padding: 2px !important;
background-color: Menu !important;
}
menubar > menu {
border: 1px solid transparent !important;
padding: 2px 5px 2px 7px !important;
margin: 0 !important;
}
menubar > menu[_moz-menuactive="true"] {
background-color : Highlight !important;
color: HighlightText !important;
}
/* Windows Classic (9x/Me/2000) style Menus */
menupopup, popup {
border: 2px solid !important;
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
padding: 1px !important;
}
menubar > menu[disabled="true"] {
border: 1px solid transparent !important;
}
menubar > menu[_moz-menuactive="true"] {
border-top: 1px solid ThreeDHighlight !important;
border-right: 1px solid ThreeDShadow !important;
border-bottom: 1px solid ThreeDShadow !important;
border-left: 1px solid ThreeDHighlight !important;
background-color: transparent !important;
color: MenuText !important;
}
menubar > menu[_moz-menuactive="true"][open="true"] {
border-top: 1px solid ThreeDShadow !important;
border-right: 1px solid ThreeDHighlight !important;
border-bottom: 1px solid ThreeDHighlight !important;
border-left: 1px solid ThreeDShadow !important;
}
/* Use a background image for the toolbars:
(Substitute your image file for background.gif) */
menubar, toolbox, toolbar, .tabbrowser-tabs {
background-image: url("background.gif") !important;
background-color: none !important;
}
It's easiest to place the image file in the same location as the userChrome.css file. The image can be of any image format supported by Firefox.
/* Change color of active tab */ tab{ -moz-appearance: none !important; } tab[selected="true"] { background-color: rgb(222,218,210) !important; color: black !important; } /* Change color of normal tabs */ tab:not([selected="true"]) { background-color: rgb(200,196,188) !important; color: gray !important; }
/* Make the active tab not bold */
tab[selected="true"] {
font-weight: normal !important;
}
/* Remove the close button on the tab bar */
.tabs-closebutton {
display: none !important;
}
You can still close tabs by right clicking on them and select Close
Tab
, or by pressing Ctrl+W
/* Remove the Go and Help menus
(These are just examples. Try changing "Go" to "Edit" or "Bookmarks") */
menu[label="Go"], menu[label="Help"] {
display: none !important;
}
/* Remove extra padding from the Navigation Bar */
.toolbarbutton-1, .toolbarbutton-menubutton-button {
padding: 2px 3px !important;
}
.toolbarbutton-1[checked="true"], .toolbarbutton-1[open="true"],
.toolbarbutton-menubutton-button[checked="true"],
.toolbarbutton-menubutton-button[open="true"] {
padding: 4px 1px 1px 4px !important;
}
C:\Program Files\Mozilla Firefox\) and
then go to the subfolder chrome.chrome, create a new
subfolder called icons, then go to that
folder and create yet another subfolder called
default. The full path to this folder could be C:\Program
Files\Mozilla Firefox\chrome\icons\default\.main-window.[ext], e.g.
main-window.ico on Windows and
main-window.xpm on Linux.In addition to the main window, you can also change the
icon on the Bookmark Manager and JavaScript Console. The icon names are
bookmark-window.[ext] and
jsconsoleWindow.[ext],
respectively.
After this is done, restart Firefox and you should be able to see your chosen icon in the title of the browser windows.
/* Place the sidebar on the right edge of the window */
window > hbox {
direction:rtl;
}
window > hbox > * {
direction:ltr;
}
/* Make the Search box flex wider
(in this case 400 pixels wide) */
#search-container, #searchbar {
-moz-box-flex: 400 !important;
}
// Reveal more tab/window options:
user_pref("browser.tabs.showSingleWindowModePrefs", true);
Restart Firefox and go to Tools > Options... (Edit > Preferences... under Linux and Mac OS X), select Advanced and click on Tabbed Browsing. The following options should be visible:
The options should be self-explanatory.
/* Force New Windows Restrictions
0: Default - Divert *all* new windows to current tab/window or new tab
1: Don't divert *any* windows spawned by JS
2: Don't divert JS windows that include size/placement/toolbar info */
user_pref("browser.link.open_newwindow.restriction", 2);
// Instead of annoying error dialog messages, display pages:
user_pref("browser.xul.error_pages.enabled", true);
Note that this feature is still a bit buggy as it removes the last visited page from the Back button history.
// Find As You Type Configuration: // Set this pref to false to disable Find As You Type: user_pref("accessibility.typeaheadfind", true); // If you set this pref to true, typing can automatically start Find As You Type. // If false (default), you must hit / (find text) or ' (find links) before your search. user_pref("accessibility.typeaheadfind.autostart", true); // Set this pref to false if you want Find As You Type to search normal text too: user_pref("accessibility.typeaheadfind.linksonly", true); // Set this pref to true if you require that the link starts with the entered text: user_pref("accessibility.typeaheadfind.startlinksonly", false); // This is the time in milliseconds for the Find As You Type to stop watching for keystrokes: user_pref("accessibility.typeaheadfind.timeout", 3000);
For information about what Find As You Type is, read the href="http://www.mozilla.org/access/type-ahead/"> documentation.
// More DOM/JavaScript options // Make sure all pop-up windows are resizable: user_pref("dom.disable_window_open_feature.resizable", true); // Make sure all pop-up windows are minimizable: user_pref("dom.disable_window_open_feature.minimizable", true); // Always display the menu in pop-up windows: user_pref("dom.disable_window_open_feature.menubar", true); // Always display the Navigation Toolbar in pop-up windows: user_pref("dom.disable_window_open_feature.location", true); // Prevent sites from disabling scrollbars: user_pref("dom.disable_window_open_feature.scrollbars", true);
bookmarks.htmland is stored in the profile folder. For example, if you want to use the bookmarks for Netscape 7 in Firefox, add the following code to your href="edit.htm#user">user.js file:
// Specify which bookmarks file to use:
user_pref("browser.bookmarks.file", "C:\\Path To Netscape Profile\\bookmarks.html");
Remember to use two backslashes for the path separators if you're using
Windows, e.g. C:\\Path\\bookmarks.html
instead of C:\Path\bookmarks.html.
This tip can also be used on dual-boot systems to use the same bookmarks on both operating systems. Just make sure that you place the file on a location that you have write access to from operating systems.
// Change to normal Google search:
user_pref("keyword.URL", "http://www.google.com/search?btnG=Google+Search&q=");
Of course, you could also change to a completely different search engine by changing the string to something else. The default search string is: "http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=".
// Disable Bookmark Icons
user_pref("browser.chrome.site_icons", false);
user_pref("browser.chrome.favicons", false);
// Click on throbber to go to Mozilla.org:
user_pref("browser.throbber.url", "http://www.mozilla.org/");
Andrew Mutch has written a page explaining how to implement this restriction. Read it href="http://tln.lib.mi.us/~amutch/pro/phoenix/location.htm"> here.
Alternatively, right-click on the link and select Bookmark This Link....
Because of the length of the code in this tip, it is available in a separate page.
// Put an end to blinking text!
user_pref("browser.blink_allowed", false);
/* Stop those <marquee> tags! */
marquee {
-moz-binding : none !important;
display : block;
height : auto !important;
}
//"+mesg+"<\/font><\/i>")
if (isNS) {
document.write("// Force frames to be resizable
user_pref("layout.frames.force_resizability", true);
Note that this will also make the frames appear with a fixed-width border and thus, may make the pages look funny.
/* Change cursor for links that open in new window */
:link[target="_new"], :visited[target="_new"],
:link[target="_new"], :visited[target="_new"] {
cursor: crosshair;
}
/* Change cursor for JavaScript links */
a[href^="javascript:"] {
cursor: move;
}
R:\Firefox for the application folder and
R:\FFProfile as the profile folder, assuming the drive letter for
the removable media is R:.R:\Firefox.bat
with the following line:
start \Firefox\firefox.exe -profile \FFProfile
The reason why a batch file is needed instead of a simple shortcut is that a shortcut uses absolute paths, and since the actual drive letter for the removable media may change depending on which computer it is plugged into, the relative path used in the batch file is guaranteed to work anywhere.
// Last value in milliseconds (default is 250)
user_pref("nglayout.initialpaint.delay", 0);
// Enable pipelining:
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 8);
// Path to Cache folder:
user_pref("browser.cache.disk.parent_directory","C:\\Path To Cache");
Remember to use two backslashes for the path separators if you're using
Windows, e.g. C:\\Path\\Path To Cache
instead of C:\Path\Path To
Cache
.
// Specify the amount of memory cache:
// -1 = determine dynamically (default), 0 = none, n = memory capacity in kilobytes
user_pref("browser.cache.memory.capacity", 4096);
To disable the memory cache completely, add the following code:
// Disable memory cache:
user_pref("browser.cache.memory.enable", false);
Restricting web access is accomplished by using the proxy settings in Firefox. Read all about how to accomplish this on href="http://tln.lib.mi.us/~amutch/pro/phoenix/proxies.htm"> this page, written by Andrew Mutch.