enhance(frontend/aiscript): セーブ内容を削除できるMk:removeを追加

This commit is contained in:
kakkokari-gtyih 2024-12-20 17:29:23 +09:00
parent f123be38b9
commit 5a091c6214

View File

@ -82,6 +82,11 @@ export function createAiScriptEnv(opts) {
utils.assertString(key);
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(() => {
return values.STR(window.location.href);
}),