mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
enhance(frontend/aiscript): セーブ内容を削除できるMk:remove
を追加
This commit is contained in:
parent
f123be38b9
commit
5a091c6214
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ export function createAiScriptEnv(opts) {
|
||||||
utils.assertString(key);
|
utils.assertString(key);
|
||||||
return utils.jsToVal(JSON.parse(miLocalStorage.getItem(`aiscript:${opts.storageKey}:${key.value}`)));
|
return utils.jsToVal(JSON.parse(miLocalStorage.getItem(`aiscript:${opts.storageKey}:${key.value}`)));
|
||||||
}),
|
}),
|
||||||
|
'Mk:remove': values.FN_NATIVE(([key]) => {
|
||||||
|
utils.assertString(key);
|
||||||
|
miLocalStorage.removeItem(`aiscript:${opts.storageKey}:${key.value}`);
|
||||||
|
return values.NULL;
|
||||||
|
}),
|
||||||
'Mk:url': values.FN_NATIVE(() => {
|
'Mk:url': values.FN_NATIVE(() => {
|
||||||
return values.STR(window.location.href);
|
return values.STR(window.location.href);
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue