K-Meleon

The user.js file is an advanced way of changing preferences. You can change most settings from the browser or K-Meleon's config files. The standard way to change advanced preferences is to type about:config into the address bar and press enter. Any preferences set in user.js will override settings on the about:config page.

There are 2 advantages to editing user.js to change settings:

  1. User.js is permanent. It will override changes made in the browser.
  2. User.js is portable.. You can move prefs to a new installation simply by moving the profile over.

You can find user.js at K-Meleon > Profiles > your.profile > user.js and can open it with any text editor. There may be no settings in the file by default.


Syntax

A brief guide to syntax rules:

  • Any line beginning with // is a comment and won't affect K-Meleon.
  • Any valid preference setting will begin with user_pref and end with a semi-colon.
  • All preferences must begin on a new line.
  • All preferences must include a name in quotation marks, a comma, and a value.
  • A value can be an integer, boolean, or a string depending on the preference.
  • If the preference value is stored in a separate file, the file location must use 2 backslashes.
  • For example user_pref("accessibility.mouse_focuses_formcontrol", true); would move the cursor focus to a web form when the mouse cursor was over that form without waiting for a mouse click.


Removing Preferences

Changes in user.js will be added to prefs.js also. To remove a preference, edit out the line in user.js and then edit out the same line in prefs.js. Both files can be opened in any text editor. The open-source text editor Notepad++ offers syntax highlighting.


More information

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.