Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I make about:config changes using a java script?

  • 1 பதிலளி
  • 1 இந்த பிரச்சனை உள்ளது
  • Last reply by cor-el

I want to change some of the configurations in my firefox browser. I do not want the changes to be made manually using about:config. Instead, I want to do this in a file. I find that there is a way by typing the changes in user.js file and place it in the user profile. for example, in Windows, the file should be placed in: C:\Users\myUser\AppData\Roaming\Mozilla\Firefox\Profiles The changes is in the form:

user_pref("varName", flase);

I did typed the changes in user.js and placed it as the above path. I reopen the about:config, and found nothing changed. I restarted firefox and even logged out/in and nthing happened. Can you please clarify to me how can I change firefox configuration through js files?

Here is the reference:

All Replies (1)

Can you post the content of the user.js file?

Make sure that the file name is user.js and not user.js.txt as can happen if you create a new text file or have "Text files" and not "All files" selected when using Save Files As to save the file.

The user.js file is read each time Firefox is started and initializes preferences to the value specified in this file, so preferences set via user.js can only be changed temporarily in Firefox for the current session.

Note that you can also use a mozilla.cfg file in the Firefox program folder to lock prefs or specify new (default) values.

Place a local-settings.js file in the defaults\pref folder where also the channel-prefs.js file is located to specify using mozilla.cfg.

pref("general.config.filename", "mozilla.cfg");

These functions can be used in the mozilla.cfg file:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes


cor-el மூலமாக திருத்தப்பட்டது