Customize Firefox Behavior

Open external links in new windows or tabs

If another program wants to display a web page in the default browser, Firefox will reuse an existing window by default, which means that it will navigate from a page you might be reading. To stop this, Go to Tools > Options… (Edit > Preferences… under Linux and Mac OS X), select Advanced and click on Tabbed Browsing. Under “Open links from other applications in:”, you can choose the alternative you prefer.

Reveal More Tab/Window Options

There are some hidden options for the Tabbed Browsing that will allow you to force links that open new windows to open in the current or a new tab. First, add the following code to your user.js file:

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

Force links that open new windows to open in:
the same tab/window as the link
a new tab

The options should be self-explanatory.

Decide which New Windows to Block

In the tip above, you learned how to reveal the Force links that open new windows… option. If you activated this, all windows that a web page wants to open will be diverted to either the current tab/window or a new tab. However, this also applies to small pop-up windows (e.g. a poll results window or the ICQ window in go.icq.com), which really should be opened in a new window. To change this behavior so it doesn’t divert new windows that are spawned by JavaScript, add the following code to your user.js file:

/* 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);

Tweak Find As You Type

Find As You Type has a few hidden preferences that can be changed to better fit your needs. Add the following prefs to your user.js file:

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

Disable Other JavaScript Window Features

Firefox has a few options that allow you to decide what scripts can and can not do with windows. These options are available from Tools > Options > Web Features > Advanced. However, this list of options doesn’t cover them all. There are some other useful options which can be applied by adding the following code to your user.js file:

// 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);
Use your Netscape 6/7 or Mozilla bookmarks in Firefox

If you are using Netscape 6/7 or Mozilla, you can share your bookmarks with Firefox. All bookmarks are stored in a file called bookmarks.html and 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 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 the search mode in the address field

By default, if you enter a search term in the address field and press Enter, a Google “I’m Feeling Lucky” search is performed, and you’re taken to the first result of that search directly. If you prefer to see the standard search result list instead, add the following code to your user.js file:

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

You can disable the display of bookmark icons and “favicons” by adding the following code to your user.js file:

// Disable Bookmark Icons
user_pref("browser.chrome.site_icons", false);
user_pref("browser.chrome.favicons", false);
Change the Activity Indicator URL

When you click on the Activity Indicator (also known as the “throbber”), you are directed to the Firefox Start Page. This can be changed to any URL by adding the following code to your user.js file:

// Click on throbber to go to Mozilla.org:
user_pref("browser.throbber.url", "http://www.mozilla.org/");
Prevent URLs from being saved in Location Bar

Firefox allows you to prevent URLs from being saved in the pull-down menu for the Location Bar. This restriction helps protect user privacy and prevent users from “stumbling” into sites that other users had previously viewed.

Andrew Mutch has written a page explaining how to implement this restriction. Read it here.

Prevent sites from disabling the context menu

Some sites prevent you from right-clicking on the page to show the context menu. This bookmarklet will disable such attempts with just a single click. Drag the following link to the Bookmarks Toolbar Folder in Firefox, or to your Bookmarks menu, to create a bookmark:

Enable Context Menu

Alternatively, right-click on the link and select Bookmark This Link….

Download Firefox: GetFirefox.com
Source : Mozilla.org

Leave a Reply

Your email address will not be published. Required fields are marked *