mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-24 03:12:46 +01:00
Add trusted-set-session-storage-item
scriptlet
Related discussion: https://github.com/uBlockOrigin/uAssets/issues/20630#issuecomment-1807390945
This commit is contained in:
parent
a373efe9c0
commit
f3d6a21e7a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user