I am developing an addon/extension that opens extension page when user clicks icon in toolbar using ,
//background.js
browser.browserAction.onClicked.addListener(()=> {
browser.tabs.create({
active: true,
url: "./my-page.html"
})
This page is where user will spend time and I am using indexDB to store data and want to persist it between sessions.
During debugging I noticed that even though I have provided ID in browser_specific_settings
in the manifest like so ,
{
"manifest_version": 2,
...
"browser_specific_settings": {
"gecko": {
"id": "<my-extension-id>",
"strict_min_version": "42.0"
}
},
...
}
when the page is opened it uses the internal UUID randomly generated everytime I load the extension by Firefox.
moz-extension://<internal-UUID>/my-page.html
Because the URL changes , I am not able to persist indexedDB storage, it’s fresh everytime.
Is it possible to somehow make the extension page open with my id instead of internal UUID? Also I am assuming that this will not be a problem when extension is installed because it will keep the internal ID as long as user doesn’t uninstall / remove it, is that correct.
Thanks in advance.