Jdcc
Jdcc

Reputation: 75

FireFox - Are all preferences in about:config located in .js files?

I am writing a script to grab some Firefox settings, however it looks like some preferences are not within Firefox's various .js files.

The preferences I am referring to are the preferences in about:config (such as network.http.max-connections). The .js file I am mainly referring to is prefs.js.

So my question is: Are all preferences shown in about:config hidden in some .js file?

Thanks! Jonathan

Upvotes: 1

Views: 4743

Answers (2)

jrn.ak
jrn.ak

Reputation: 36637

http://www.mozilla.org/unix/customizing.html#prefs

Normal prefs are kept in prefs.js in the user's profile directory

I'm going to guess that prefs with default settings aren't written to the file.

You might take a look at the Preferential addon documentation.

Upvotes: 1

Nickolay
Nickolay

Reputation: 32081

What are you actually trying to do?

prefs.js in the user profile stores the modified preferences.

The default values are stored in <app dir>/defaults/preferences/* and in similar directories in every installed extension. Not all preferences that have effect on the core application are listed in the defaults files. Those that are not, are not listed in about:config until the user adds add them.

From within Firefox getting the list of preferences that have user-set or default value is easily done via the pref API, in particular nsIPrefBranch.

[edit] see also https://developer.mozilla.org/en/Code_snippets/Preferences#Default_preferences

Upvotes: 0

Related Questions