Improve MisskeyPages
* ifブロック を追加 * ボタンやスイッチなどのテキストに変数使えるようにした
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user