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 detect if WebExtension is installed?

  • 3 trả lời
  • 2 gặp vấn đề này
  • 2 lượt xem
  • Trả lời mới nhất được viết bởi Alixandir

more options

I'm developing a firefox add on, using the new web extension mechanism. Now I need to check in my web page if the extension is installed. I know that in chrome you have: chrome-extension://nnhadaeaehpngjcegobbnogakdapkiph/{your content} Is there something like that in firefox? Is there an alternative way?

Best,

Ofer

I'm developing a firefox add on, using the new web extension mechanism. Now I need to check in my web page if the extension is installed. I know that in chrome you have: chrome-extension://nnhadaeaehpngjcegobbnogakdapkiph/{your content} Is there something like that in firefox? Is there an alternative way? Best, Ofer

Tất cả các câu trả lời (3)

more options

hi ofer, for developement related questions it's best to ask in the official addon forum at https://discourse.mozilla-community.org/c/add-ons since there will be more mozilla staff from the addons team and other devs reading along there...

more options
more options

The best way is to add any class or data attribute to body or another part of DOM in case if you have content script. Also you can use sendMessage API and ask extension about status.

I hope that Mozilla team will support chrome method to request is extension installed.

But for now - little DOM modification the best way to deal with it :) And "has" cross browsers support.