From 5a091c62146563d2a2e742d7fa8788a4cb49b0c0 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:29:23 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend/aiscript):=20=E3=82=BB?= =?UTF-8?q?=E3=83=BC=E3=83=96=E5=86=85=E5=AE=B9=E3=82=92=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B`Mk:remove`=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/aiscript/api.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts index 46aed49330..bc79b3cc50 100644 --- a/packages/frontend/src/scripts/aiscript/api.ts +++ b/packages/frontend/src/scripts/aiscript/api.ts @@ -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); }),