当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

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.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

How to ovverride locked setting(homepage) in custom profile?

  • 1 件の返信
  • 1 人がこの問題に困っています
  • 8 回表示
  • 最後の返信者: cor-el

more options

Hello!

I have firefox.cfg file with locked settings, for example default value for 'browser.startup.homepage'. For my tests I need to create a custom profile, and ovverride this preference 'browser.startup.homepage'. It`s possible? Or a new created profile will have the same locked preferences?

Hello! I have firefox.cfg file with locked settings, for example default value for 'browser.startup.homepage'. For my tests I need to create a custom profile, and ovverride this preference 'browser.startup.homepage'. It`s possible? Or a new created profile will have the same locked preferences?

すべての返信 (1)

more options

If you override settings via a mozilla.cfg file then this applies to all profile started via that Firefox installation. You would either have to disable the .js file that specifies the mozilla.cfg file or create a second custom installation hat doesn't have the mozilla.cfg file. The purpose of the mozilla.cfg file is that you can't override it.

If you really want to override it then check the profile folder that is used and exclude that specific folder name from that pref call.

The mozilla.cfg file is evaluated as a JavaScript file and can contain advanced JavaScript code that runs with chrome privileges.


var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
var profD = Services.dirsvc.get("ProfD", Ci.nsILocalFile).path;