Skip to content

Commit

Permalink
URL取得変数を関数に変更 #11392
Browse files Browse the repository at this point in the history
  • Loading branch information
setaria430 committed Jul 26, 2023
1 parent cf3ac3c commit 824bf76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

### Client
- リストTLで、ユーザーが追加・削除されてもTLを初期化しないように
- URL取得変数を関数に変更 CURRENT_URL -> Mk:url()
- Fix: モバイル表示のときページ下部がナビゲーションバーに隠れる問題を修正
- Fix: 一部モーダルダイアログでスクロールできない問題を修正
- Fix: Selecting all emojis in Custom emoji is impossible
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/scripts/aiscript/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export function createAiScriptEnv(opts) {
USER_NAME: $i ? values.STR($i.name) : values.NULL,
USER_USERNAME: $i ? values.STR($i.username) : values.NULL,
CUSTOM_EMOJIS: utils.jsToVal(customEmojis.value),
CURRENT_URL: values.STR(window.location.href),
'Mk:dialog': values.FN_NATIVE(async ([title, text, type]) => {
await os.alert({
type: type ? type.value : 'info',
Expand Down Expand Up @@ -48,5 +47,8 @@ export function createAiScriptEnv(opts) {
utils.assertString(key);
return utils.jsToVal(JSON.parse(miLocalStorage.getItem(`aiscript:${opts.storageKey}:${key.value}`)));
}),
'Mk:url': values.FN_NATIVE(() => {
return values.STR(window.location.href);
}),
};
}

0 comments on commit 824bf76

Please sign in to comment.