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
This commit is contained in:
Allan Niles 2024-02-06 09:55:03 -07:00 committed by GitHub
parent 29dff80731
commit 05554354c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -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() {

View file

@ -68,8 +68,9 @@
<a href="https://github.com/Protektor-Desura" target="_blank" title="Protektor-Desura - Protektor">![Avatar Protektor]</a>&nbsp;
<a href="https://github.com/oyepriyansh" target="_blank" title="oyepriyansh - Priyansh Prajapat">![Avatar Priyansh]</a>&nbsp;
<a href="https://github.com/debuggerx01" target="_blank" title="debuggerx01">![Avatar debuggerx01]</a>&nbsp;
<a href="https://github.com/eric183" target="_blank" title="eric183 - ericKuang">![Avatar Michael]</a>&nbsp;
<a href="https://github.com/michael-j-green" target="_blank" title="michael-j-green - Michael Green">![Avatar ericKuang]</a>&nbsp;
<a href="https://github.com/eric183" target="_blank" title="eric183 - ericKuang">![Avatar ericKuang]</a>&nbsp;
<a href="https://github.com/michael-j-green" target="_blank" title="michael-j-green - Michael Green">![Avatar Michael]</a>&nbsp;
<a href="https://github.com/gantoine" target="_blank" title="gantoine - Georges-Antoine Assi">![Avatar gantoine]</a>&nbsp;
</div>
@ -101,6 +102,8 @@
[Avatar Michael]: https://github.com/michael-j-green.png?size=95
[Avatar gantoine]: https://github.com/gantoine.png?size=95
<!----------------------------------{ Ethan }----------------------------------->