How to modify the 'permissions.default.image' preference based on website host in Firefox for Android?
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.
All Replies (4)
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
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.
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®exp=false but I still can't change the value of permissions.default.image from geckoEngineSession.kt . Do you know if it's possible?
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.