User.js file: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Added a few more preferences, and also added some defaults.)
(Firefox : FAQs : About:config Entries; removing some prefs bc this is a user.js article, not a documentation; adding links instead)
Line 1: Line 1:
: ''This article is also to serve as a dual reference for the Firefox counterpart of user.js and prefs.js''
'''user.js''' is a file that contains preferences that will be loaded into the Mozilla Application Suite every time the suite is started up.  Each time Mozilla is started up, the valid preferences from user.js are copied into prefs.js, which Mozilla uses to store all the preferences for the current user.
'''user.js''' is a file that contains preferences that will be loaded into the Mozilla Application Suite every time the suite is started up.  Each time Mozilla is started up, the valid preferences from user.js are copied into prefs.js, which Mozilla uses to store all the preferences for the current user.


Line 21: Line 22:
  // Default: true
  // Default: true
  user_pref("accessibility.typeaheadfind", true);
  user_pref("accessibility.typeaheadfind", true);
  // Allow type-ahead-find to work on text as well as links by default
  // Allow type-ahead-find to work on text as well as links by default
  // Default: true (Type-Ahead-Find will only work on links)
  // Default: true (Type-Ahead-Find will only work on links)
  user_pref("accessibility.typeaheadfind.linksonly", false);
  user_pref("accessibility.typeaheadfind.linksonly", false);
// The address book has a throbber. By default, all throbbers will take the
//    browser window to www.mozilla.org, but this is easy to change.
// Default: "http://www.mozilla.org"
user_pref("addressbook.throbber.url","http://www.google.com");


  // Block new windows from opening up.
  // Block new windows from opening up.
Line 39: Line 36:
  user_pref("browser.bookmarks.import_system_favorites", false);
  user_pref("browser.bookmarks.import_system_favorites", false);


  // Site icons are icons that show up in the URL bar when visiting a site.
  // Site icons are icons that show up in the URL bar when visiting a site.  
  // Favicons are a broken implementation of site icons used by Internet Explorer (IE).
  // Favicons are a broken implementation of site icons used by Internet Explorer.  
  // Web pages are supposed to tell us if they have a site icon.
  // Web pages are supposed to tell us if they have a site icon.  
  // Since IE looks for favicons on *all* sites, this causes unnecessary page hits.
  // Since IE looks for favicons on *all* sites, this causes unnecessary page hits.
  // Mozilla can do the same by setting the following preference.
  // Mozilla can do the same by setting the following preference.
// Look for Favicons (like IE) if not specified
  // Default: false (Don't look for favicons unless they're  
  // Default: false (Don't look for favicons unless they're explicitly specified in the web page.)
// explicitly specified in the web page.)
  user_pref("browser.chrome.favicons", true);
  user_pref("browser.chrome.favicons", true);
  // Look for site icons if site specifies them
  // Look for site icons if site specifies them
  // Default: true (Load site icons if they are specified in the web page)
  // Default: true (Load site icons if they are specified in the web page)
  user_pref("browser.chrome.site_icons", true);
  user_pref("browser.chrome.site_icons", true);
// Load icons (favicons/site icons) into the toolbar?
  // 0 - No
  // 0 - No
  // 1 - Show icons only if they're cached
  // 1 - Show icons only if they're cached
Line 56: Line 53:
  // Default: 0
  // Default: 0
  user_pref("browser.chrome.load_toolbar_icons", 2);
  user_pref("browser.chrome.load_toolbar_icons", 2);
// Keep download status box open after download completes?
// Default: true (Download status box remains open after download finishes)
user_pref("browser.download.progressDnldDialog.keepAlive", false);
// Download manager behavior
// 0 - Use Download Manager
// 1 - Use simple dialog
// 2 - No progress dialog
// Default: 0
user_pref("browser.downloadmanager.behavior", 1);


  // Allow images that are too big to be resized.
  // Allow images that are too big to be resized.
Line 73: Line 60:
  user_pref("browser.enable_automatic_image_resizing", true);
  user_pref("browser.enable_automatic_image_resizing", true);


// The following preferences are to specify tabbed browsing behavior
  // When opening a link in a new tab, the default behavior is to  
// Show tabs when only one tab open.
// put focus on the new tab.
// Default: true (Tabs are hidden unless at least 2 tabs are open)
user_pref("browser.tabs.autoHide", false);
  // When opening a link in a new tab, the default behavior is to put focus on the
//    new tab.
  // Default: false (Focus always goes to the newly created tab)
  // Default: false (Focus always goes to the newly created tab)
  user_pref("browser.tabs.loadInBackground", true);
  user_pref("browser.tabs.loadInBackground", true);
Line 85: Line 68:
  // Default: false (Middle click will open the link in a new browser window)
  // Default: false (Middle click will open the link in a new browser window)
  user_pref("browser.tabs.opentabfor.middleclick", true);
  user_pref("browser.tabs.opentabfor.middleclick", true);
// Open a new tab if you hit ctrl+<enter> in the URL bar.
 
// Default: false (ctrl+<enter> will open the URL in a new browser window)
user_pref("browser.tabs.opentabfor.urlbar", true);
  // If multiple tabs are open and you close the window, the default behaviour is
  // If multiple tabs are open and you close the window, the default behaviour is
  // to warn you that there are open tabs.
  // to warn you that there are open tabs.
Line 98: Line 79:
  user_pref("browser.throbber.url", "http://www.yahoo.com/");
  user_pref("browser.throbber.url", "http://www.yahoo.com/");


// Show the search button next to the URL line
// Default: true (Search bar appears next the the URL bar)
user_pref("browser.toolbars.showbutton.search", false);


// The following preferences apply to the location bar (URL bar).
  // Automatically complete text typed into location bar.
  // Automatically complete text typed into location bar.
  // Default: true (Browser will try to autocomplete what the user types into the
  // Default: true (Browser will try to autocomplete what the user types into the
  // location bar)
  // location bar)
  user_pref("browser.urlbar.autocomplete.enabled", true);
  user_pref("browser.urlbar.autocomplete.enabled", true);
// Match only websites the user has typed into the URL bar
 
// Default: false (Try to autocomplete with any website the user has visited)
user_pref("browser.urlbar.matchOnlyTyped", true);
  // Show a dropdown list of possible matches for what the user has typed in.
  // Show a dropdown list of possible matches for what the user has typed in.
  // Default: true
  // Default: true
  user_pref("browser.urlbar.showPopup", true);
  user_pref("browser.urlbar.showPopup", true);
// Show the user's default search engine as a choice. Selecting the search engine
// will run the text in the location bar in the search engine and show the results
// as the web page.
// Default: true (Show the search engine as the last choice in the dropdown list)
user_pref("browser.urlbar.showSearch", true);
// Set the URL for the composer throbber
// Default: "http://www.mozilla.org/"
user_pref("compose.throbber.url","http://www.google.com");
// The following three preferences are used to time the rendering of the page as
//  it's being loaded. (Incremental rendering of a page) Optimal values are
//  dependant on processor speed and network connection speed.
// By default timer-based reflow management is not used.
// Turn on timer-based reflow management
// Default: <not set>
user_pref("content.notify.ontimer", true);
// Number of reflows to do before waiting for the rest of the page to arrive.
// Default: <not set>
user_pref("content.notify.backoffcount", 200);
// Time between reflows in microseconds
// Default: <not set>
user_pref("content.notify.interval", 100);
// Set a minimum font size for text (can break many web sites)
// A UI is now in place for this pref, and can be found under Appearance->Fonts.
// See bug 30910.
// Default: (not set))
user_pref("font.minimum-size.x-western", 13);


  // Enable smooth scroll on PgUP/PgDn, similar to IE.
  // Enable smooth scroll on PgUP/PgDn, similar to IE.
Line 147: Line 93:
  user_pref("general.smoothScroll", true);
  user_pref("general.smoothScroll", true);


// The following preferences are to determine collection of email addresses in a
===External Links===
// separate addressbook.
* [[Firefox : FAQs : About:config Entries | about:config Entries for Firefox]]- A collection of descriptions for every about:config (pref.js) entry. Still in its early roots. Most should apply to Mozilla too.
// Should we collect email addresses in a separate addressbook?
* [http://www.geocities.com/pratiksolanki/ Hidden Mozilla Prefs]
// Default: true
* [http://texturizer.net/firefox/tips.html Firefox Help: Tips and Tricks]- Most should also apply to Mozilla
user_pref("mail.collect_email_address", false);
user_pref("mail.collect_email_address_incoming", false);
user_pref("mail.collect_email_address_size_limit", 10);

Revision as of 23:06, 3 March 2004

This article is also to serve as a dual reference for the Firefox counterpart of user.js and prefs.js

user.js is a file that contains preferences that will be loaded into the Mozilla Application Suite every time the suite is started up. Each time Mozilla is started up, the valid preferences from user.js are copied into prefs.js, which Mozilla uses to store all the preferences for the current user.

Similar to the user.js file, entering about:config in the URL bar will edit the preferences for the current Mozilla user profile. Changes made in this manner will directly modify the prefs.js file.

Mozilla will never modify the contents of user.js. However, the contents of prefs.js is frequently modified by Mozilla. If you wish do modify prefs.js directly, you should take care to shut down Mozilla completely before you open the file. Otherwise your edits may be overwritten.

The user.js file is located in the same directory as prefs.js. user.js is never created by Mozilla, so if the file doesn't exist, don't worry! Simply create the text file with any text editor, such as notepad, emacs, or vi. Make sure you save the file in the same directory as prefs.js.

Valid preferences are via the user_pref command, as demonstrated below.

// denotes a comment. Anything after these two characters on a line are ignored.

Following are a number of preferences and what they do. For lack of a better way of ordering them, they are alphabetical via preference name. These can be copied "as-is" into your user.js file.

// Type-Ahead-Find allows the user to search for text or links on a site by just
// typing the search term.
// Find next instance of the search term is <F3>.
// Find previous instance of the search term is <Shift-F3>.
// Turn on Type-Ahead-Find
// Default: true
user_pref("accessibility.typeaheadfind", true);
// Allow type-ahead-find to work on text as well as links by default
// Default: true (Type-Ahead-Find will only work on links)
user_pref("accessibility.typeaheadfind.linksonly", false);
// Block new windows from opening up.
// Default: false (Allow popups)
user_pref("browser.block.target_new_window", true);
// IE Favorites (bookmarks) are imported the first time Mozilla is run.
// This preference is to determine whether they are shown in the bookmarks menu
// Default: true (Show IE Favorites under bookmarks)
user_pref("browser.bookmarks.import_system_favorites", false);
// Site icons are icons that show up in the URL bar when visiting a site. 
// Favicons are a broken implementation of site icons used by Internet Explorer. 
// Web pages are supposed to tell us if they have a site icon.   
// Since IE looks for favicons on *all* sites, this causes unnecessary page hits.
// Mozilla can do the same by setting the following preference.
// Default: false (Don't look for favicons unless they're 
// explicitly specified in the web page.)
user_pref("browser.chrome.favicons", true);
// Look for site icons if site specifies them
// Default: true (Load site icons if they are specified in the web page)
user_pref("browser.chrome.site_icons", true);
// 0 - No
// 1 - Show icons only if they're cached
// 2 - Always show icons
// Default: 0
user_pref("browser.chrome.load_toolbar_icons", 2);
// Allow images that are too big to be resized.
// Image resizing is used if a image is viewed that's too large to fit in the browser
// window.
// Default: false
user_pref("browser.enable_automatic_image_resizing", true);
// When opening a link in a new tab, the default behavior is to 
// put focus on the new tab.
// Default: false (Focus always goes to the newly created tab)
user_pref("browser.tabs.loadInBackground", true);
// Open a link in a new tab if you 'middle click' on the link. Clicking down on a
//    mouse wheel is concidered a middle click.
// Default: false (Middle click will open the link in a new browser window)
user_pref("browser.tabs.opentabfor.middleclick", true);
// If multiple tabs are open and you close the window, the default behaviour is
// to warn you that there are open tabs.
// Default: true (Warn if closing the browser window will close multiple tabs)
user_pref("browser.tabs.warnOnClose", false);
// The browser window has a throbber. By default, all throbbers will take the
//    browser window to www.mozilla.org, but this is easy to change.
// Default: "http://www.mozilla.org/"
user_pref("browser.throbber.url", "http://www.yahoo.com/");


// Automatically complete text typed into location bar.
// Default: true (Browser will try to autocomplete what the user types into the
// location bar)
user_pref("browser.urlbar.autocomplete.enabled", true);
// Show a dropdown list of possible matches for what the user has typed in.
// Default: true
user_pref("browser.urlbar.showPopup", true);
// Enable smooth scroll on PgUP/PgDn, similar to IE.
// Default: false
user_pref("general.smoothScroll", true);

External Links