Permission dialog in a WebExtensions add-on replacing a Legacy add-on


(Lipocodes) #1

Hi folks,

I need to upload a new WebExtensions API add-on to replace an old Legacy (XUL) add-on.

I need the new add-on to pop-up a permission dialog once installed, even without users opening the add-on itself (most users have already forgotten that it’s installed and need to get a reminder).

How can it be implemented?

Thanks for your great help,
Larry


(Martin Giger) #2

Do you have any UI elements (browser action, page action, etc)?

Alternatively I’d suggest opening a tab upon updating or showing a notification on every startup that the necessary setup has not been completed.

I assume you need an OAuth login or similar?


(Lipocodes) #3

Hi Martin,

Thanks for your reply.

“I’d suggest opening a tab upon updating or showing a notification on every startup that the necessary setup has not been completed.”

Do you have an example of how to do this?

Thanks,

Larry


(Martin Giger) #4

I don’t have an example for the very mechanism you’d need. It also depends on how you store the result etc.

To open tabs, use https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/create
To create a notification, use https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/notifications/create