From 60d81d74e35879f52a374d5e35fe25dc115d75a4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Jul 2020 23:10:04 +0900 Subject: [PATCH] feat(client): AiScript: Plugin:open_url function --- src/client/scripts/aiscript/api.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/scripts/aiscript/api.ts b/src/client/scripts/aiscript/api.ts index 90418fc5c..f3ab6c372 100644 --- a/src/client/scripts/aiscript/api.ts +++ b/src/client/scripts/aiscript/api.ts @@ -73,6 +73,9 @@ export function createPluginEnv(vm, opts) { 'Plugin:register_note_view_interruptor': values.FN_NATIVE(([handler]) => { vm.$store.commit('registerNoteViewInterruptor', { pluginId: opts.plugin.id, handler }); }), + 'Plugin:open_url': values.FN_NATIVE(([url]) => { + window.open(url.value, '_blank'); + }), 'Plugin:config': values.OBJ(config), }; }