搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Set preference for url by about: config

  • 3 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

Hi, I'm doing a custom Firefox for my company and I'd like to know if you can set a preference for url using about: config That is, for example I want to use the preference I have in my file.cfg security.fileuri.origin_policy for a url in value true and in the other url in false. If you could help me, I would be very grateful

Hi, I'm doing a custom Firefox for my company and I'd like to know if you can set a preference for url using about: config That is, for example I want to use the preference I have in my file.cfg security.fileuri.origin_policy for a url in value true and in the other url in false. If you could help me, I would be very grateful

所有回复 (3)

more options

If that is dependent on the Firefox profile that is used then you can add test code to test wht profile is used currently. Keep in mind that an mozilla.cfg file can contain valid JavaScript code.

This code gives you the path to the profile folder.

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

由cor-el于修改

more options

I'm sorry if I expressed myself wrong, my question was that if you want to apply for example the pref: lockPref geo.enabled, true value for https://www.google.es and for other sites geo.enabled, false, if it is possible to do it with about: config?

more options

That isn't possible via about:config. Setting this pref is all or nothing. What you want is to modify/set specific site preferences as you can find in "Tools -> Page Info -> Permissions". Site specific permissions are stored in content-prefs.sqlite