Add Tampermonkey WebExtension manifest and managed storage compatibility

This commit is contained in:
wuggy 2026-09-19 04:45:24 -07:00
commit cc3106406f
5 changed files with 80 additions and 3 deletions

View file

@ -41,6 +41,27 @@ function storageApiFactory(context) {
},
},
managed: {
get: function(keys) {
keys = sanitize(keys);
return context.childManager.callParentAsyncFunction("storage.managed.get", [
keys,
]);
},
set: function() {
throw new context.cloneScope.Error(
"storage.managed is read-only");
},
remove: function() {
throw new context.cloneScope.Error(
"storage.managed is read-only");
},
clear: function() {
throw new context.cloneScope.Error(
"storage.managed is read-only");
},
},
sync: {
get: function(keys) {
keys = sanitize(keys);