API in webpage to track Add-on is enabled / installed by the user


(Bingdefaultsteam) #1

Hi Team,

Our team has a self-distribution add-on which is installed from a webpage. We are interested to redirect the webpage once the user completes the installation of the extension.

Is there any API which informs the webpage that the Add-on is enabled/ installed by the user ?

Note : API needs to be implemented in the extension provider webpage without making any changes to the extension.

Thanks
Bing Defaults Team


(Jorge) #2

I don’t think any event is fired. The easiest way to do this would be for the extension to look for a page or fire some event, but it sounds like this doesn’t meet your requirements.


(Bingdefaultsteam) #3

Thanks Jorgev for your reply.

Is it possible for the webpage to check that our add-on is already installed in the user machine? .
By doing so the webpage will not install the add-on again as the add-on is already present in the user machine.


(Jorge) #4

The extension can expose resources to webpages, which could be used for detection. See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/web_accessible_resources


(Bingdefaultsteam) #5

Hi Jorgev, we looked into the web_accessible_resources its seen that UUID is needed to access the resource. When a webpage is inside the extension the “browser.extension.getURL” method can be used to obtain the web_accessible_resources URL but we need to access the web_accessible_resources outside of the extension, i.e, from a website which is hosted in AZURE environment. Please help us on how can the web_accessible_resources URL be obtained for a website hosted in AZURE environment ?


(Martin Giger) #6

You would have to use a content script to pass the resources into the webpage.