Improve MisskeyPages

* ifブロック を追加
* ボタンやスイッチなどのテキストに変数使えるようにした
This commit is contained in:
syuilo
2019-04-30 06:40:02 +09:00
parent a60d83b101
commit 2e8e5c2751
16 changed files with 227 additions and 65 deletions

View File

@@ -38,6 +38,7 @@ class Script {
}
public interpolate(str: string) {
if (str == null) return null;
return str.replace(/\{(.+?)\}/g, match => {
const v = this.vars.find(x => x.name === match.slice(1, -1).trim()).value;
return v == null ? 'NULL' : v.toString();