FireFox - about:config 中的所有首选项是否都位于 .js 文件中?

发布于 2024-09-30 01:00:28 字数 225 浏览 1 评论 0原文

我正在编写一个脚本来获取一些 Firefox 设置,但是看起来某些首选项并不在 Firefox 的各种 .js 文件中。

我指的首选项是about:config中的首选项(例如network.http.max-connections)。我主要指的.js文件是prefs.js。

所以我的问题是:about:config 中显示的所有首选项是否都隐藏在某些 .js 文件中?

谢谢! 乔纳森

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

琉璃梦幻 2024-10-07 01:00:28

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

普通首选项保存在用户配置文件目录中的 prefs.js 中

我猜测具有 default 设置的首选项不会写入该文件。

您可以查看 Preferential 插件文档。

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.

蒗幽 2024-10-07 01:00:28

你到底想做什么?

用户配置文件中的 prefs.js 存储修改后的首选项。

默认值存储在/defaults/preferences/* 以及每个已安装扩展中的类似目录中。 defaults 文件中并未列出所有对核心应用程序有影响的首选项。那些没有的,不会在 about:config 中列出,直到用户添加它们为止。

在 Firefox 中,通过 pref API 可以轻松获取具有用户设置或默认值的首选项列表,特别是 nsIPrefBranch

[编辑] 另请参阅 https://developer.mozilla.org/en/Code_snippets/Preferences#默认_首选项

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文