搜索 | 用户支持

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

详细了解

How to modify the 'permissions.default.image' preference based on website host in Firefox for Android?

  • 4 个回答
  • 0 人有此问题
  • 4 次查看
  • 最后回复者为 Paul

more options

I am currently trying to customize the Firefox browser for Android and have encountered a hurdle. Specifically, I want to change the 'permissions.default.image' setting according to the host of the website being visited.

I have searched through the source code, but I'm unable to locate where this preference is being modified, which is adding to my difficulties. I'm uncertain about the next steps to take.

Could anyone please guide me on how to implement this functionality, or direct me towards relevant resources or documentation that could help me? Any leads or suggestions would be greatly appreciated.

Thank you in advance for your assistance.

Best regards

I've already attempted to implement this in the GeckoEngineSession in the override fun onLoadRequest method, as that's where the host is loaded. Unfortunately, I haven't had any success with this approach.

I am currently trying to customize the Firefox browser for Android and have encountered a hurdle. Specifically, I want to change the 'permissions.default.image' setting according to the host of the website being visited. I have searched through the source code, but I'm unable to locate where this preference is being modified, which is adding to my difficulties. I'm uncertain about the next steps to take. Could anyone please guide me on how to implement this functionality, or direct me towards relevant resources or documentation that could help me? Any leads or suggestions would be greatly appreciated. Thank you in advance for your assistance. Best regards I've already attempted to implement this in the GeckoEngineSession in the override fun onLoadRequest method, as that's where the host is loaded. Unfortunately, I haven't had any success with this approach.

所有回复 (4)

more options

it's really very strange, it's like this permission did not exist in the source code. I can't find anything about:config values anywhere. https://github.com/search?q=repo%3Amozilla-mobile%2Ffirefox-android%20permissions.default.image&type=code

more options

Hi

Some of the preferences are set in the GeckoView engine. The docs at https://mozilla.github.io/geckoview/ may be of use in looking into this further.

more options

Hello, thank you for your answer, indeed the permission appears in the geckoview engine https://searchfox.org/mozilla-central/search?q=permissions.default.image&path=&case=false&regexp=false but I still can't change the value of permissions.default.image from geckoEngineSession.kt . Do you know if it's possible?

more options

Hi

This is something that you would be better raising with our developers. I recommend that you join our Matrix instance at https://chat.mozilla.org and head to the "Fenix" room.