Perhaps more information is needed, but it seems to me that the question is answered
by your own link.
If you are the extension developer, you should include in the manifest file
manifest.json
:
"type": "storage",
"data":
{
"whitelist": "google",
"starttime": "0800",
"endtime": "1500"
}
The attribute whitelist
is referenced in the code by the
StorageArea.get() function:
var storageItem = browser.storage.managed.get('whitelist');
storageItem.then((res) => {
console.log(`Whitelist is: ${res.whitelist}`);
});
If you would like to change an existing extension, then you need to do it
from source-code, since not only the manifest needs to be changed,
but also the code itself that references the storage items.
Even if the extension uses a
Native manifest,
defined as
"specially formatted JSON files that are provisioned on the user's computer by some means outside the extension installation process", changing
the manifest is not enough.
The
storage.managed
page links to the example add-on of
favourite-colour, which is a complete example showing the definition,
access and setting of the managed data, and of creating the
manifest.json
file.