Add `trusted-set-session-storage-item` scriptlet

Related discussion:
https://github.com/uBlockOrigin/uAssets/issues/20630#issuecomment-1807390945
This commit is contained in:
Raymond Hill 2023-11-13 10:36:55 -05:00
parent a373efe9c0
commit f3d6a21e7a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 13 additions and 0 deletions

View File

@ -3870,6 +3870,19 @@ function trustedSetLocalStorageItem(key = '', value = '') {
setLocalStorageItemFn('local', true, key, value);
}
builtinScriptlets.push({
name: 'trusted-set-session-storage-item.js',
requiresTrust: true,
fn: trustedSetSessionStorageItem,
world: 'ISOLATED',
dependencies: [
'set-local-storage-item.fn',
],
});
function trustedSetSessionStorageItem(key = '', value = '') {
setLocalStorageItemFn('session', true, key, value);
}
/*******************************************************************************
*
* trusted-replace-fetch-response.js