From 65549498742d51a1ce8e7368186a2eed46920592 Mon Sep 17 00:00:00 2001 From: sheep-realms Date: Sat, 30 Sep 2023 18:16:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/echo.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/echo.js b/js/echo.js index c0d13c7..47c1f59 100644 --- a/js/echo.js +++ b/js/echo.js @@ -21,6 +21,7 @@ class Echo { this.event = { backspace: function() {}, clear: function() {}, + customEvent: function() {}, groupEnd: function() {}, groupStart: function() {}, next: function() {}, @@ -99,6 +100,9 @@ class Echo { if (obj?.printSpeed) { this.speed(obj.printSpeed); } + if (obj?.event) { + this.event.customEvent(obj.event); + } this.event.groupStart(e); return e; } @@ -112,7 +116,8 @@ class Echo { class: msg?.class, style: msg?.style, typewrite: msg?.typewrite, - printSpeed: msg?.speed + printSpeed: msg?.speed, + event: msg?.event }; let dataAfter = {