User.js file: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
No edit summary
Line 16: Line 16:
// Allow type-ahead-find to work on text by default <br>
// Allow type-ahead-find to work on text by default <br>
user_pref("accessibility.typeaheadfind.linksonly", false);<br>
user_pref("accessibility.typeaheadfind.linksonly", false);<br>
// 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.<br>
user_pref("addressbook.throbber.url","http://www.google.com");<br>
// Block new windows from opening up.<br>
user_pref("browser.block.target_new_window", true);<br>
// Show IE Favorites under bookmarks?<br>
user_pref("browser.bookmarks.import_system_favorites", false);<br>

Revision as of 03:54, 14 February 2004

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

// Turn on Type-Ahead-Find
user_pref("accessibility.typeaheadfind", true);
// Allow type-ahead-find to work on text by default
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.
user_pref("addressbook.throbber.url","http://www.google.com");
// Block new windows from opening up.
user_pref("browser.block.target_new_window", true);
// Show IE Favorites under bookmarks?
user_pref("browser.bookmarks.import_system_favorites", false);