[mv3] Removing multiple keys is supported

This commit is contained in:
Raymond Hill 2026-01-10 12:49:17 -05:00
parent c8004c4b02
commit 5e9b662024
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -73,9 +73,7 @@ const normalizeMatches = matches => {
async function resetCSSCache() { async function resetCSSCache() {
const keys = await sessionKeys(); const keys = await sessionKeys();
return Promise.all( return sessionRemove(keys.filter(a => a.startsWith('cache.css.')));
keys.filter(a => a.startsWith('cache.css.')).map(a => sessionRemove(a))
);
} }
/******************************************************************************/ /******************************************************************************/
@ -234,10 +232,7 @@ async function registerCosmetic(realm, context) {
{ {
const keys = await localKeys(); const keys = await localKeys();
for ( const key of keys ) { localRemove(keys.filter(a => a.startsWith(`css.${realm}.`)));
if ( key.startsWith(`css.${realm}.`) === false ) { continue; }
localRemove(key);
}
} }
const rulesetIds = []; const rulesetIds = [];