Implement managed storage

main
Elbert Alias 1 year ago
parent a7b0e77a3a
commit 58d1dac114

@ -49,6 +49,20 @@ const Utils = {
*/
async getOption(name, defaultValue = null) {
try {
try {
const managed = await Utils.promisify(
chrome.storage.managed,
'get',
name
)
if (managed[name] !== undefined) {
return managed[name]
}
} catch {
// Continue
}
const option = await Utils.promisify(chrome.storage.local, 'get', name)
if (option[name] !== undefined) {

@ -68,5 +68,11 @@
"optional_permissions": [
"downloads"
],
"content_security_policy": "script-src 'self'; object-src 'self'"
"content_security_policy": "script-src 'self'; object-src 'self'",
"browser_specific_settings": {
"gecko": {
"id": "wappalyzer@crunchlabz.com",
"strict_min_version": "42.0"
}
}
}

@ -77,5 +77,8 @@
],
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
},
"storage": {
"managed_schema": "schema.json"
}
}

@ -0,0 +1,10 @@
{
"type": "object",
"properties": {
"tracking": {
"title": "Tracking enabled",
"description": "Anonymously send identified technologies to wappalyzer.com",
"type": "boolean"
}
}
}
Loading…
Cancel
Save