From 05554354c9c7a93b1f69ca60fc8e9750d3ae73c1 Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Tue, 6 Feb 2024 09:55:03 -0700 Subject: [PATCH] Update Contributors Page & Modify EJS_emulator.displayMessage() (#765) * add a time argument to EJS_emulator.displayMessage() * Fix contributors/add new * make sure time is bigger than 0 --- data/emulator.js | 4 ++-- docs/Contributors.md | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/emulator.js b/data/emulator.js index 4ea43a3..9beee24 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -729,7 +729,7 @@ class EmulatorJS { saveInBrowserSupported() { return !!window.indexedDB && (typeof this.config.gameName === "string" || !this.config.gameUrl.startsWith("blob:")); } - displayMessage(message) { + displayMessage(message, time) { if (!this.msgElem) { this.msgElem = this.createElement("div"); this.msgElem.classList.add("ejs_message"); @@ -738,7 +738,7 @@ class EmulatorJS { clearTimeout(this.msgTimeout); this.msgTimeout = setTimeout(() => { this.msgElem.innerText = ""; - }, 3000) + }, (typeof time === "number" && time > 0) ? time : 3000) this.msgElem.innerText = message; } downloadStartState() { diff --git a/docs/Contributors.md b/docs/Contributors.md index 2c64305..c65ad9b 100644 --- a/docs/Contributors.md +++ b/docs/Contributors.md @@ -68,8 +68,9 @@ ![Avatar Protektor]  ![Avatar Priyansh]  ![Avatar debuggerx01]  -![Avatar Michael]  -![Avatar ericKuang]  +![Avatar ericKuang]  +![Avatar Michael]  +![Avatar gantoine]  @@ -101,6 +102,8 @@ [Avatar Michael]: https://github.com/michael-j-green.png?size=95 +[Avatar gantoine]: https://github.com/gantoine.png?size=95 +