Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

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

  • 4 trả lời
  • 0 gặp vấn đề này
  • 36 lượt xem
  • Trả lời mới nhất được viết bởi 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.

Tất cả các câu trả lời (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.