Skip to content

Commit

Permalink
Update Contributors Page & Modify EJS_emulator.displayMessage() (#765)
Browse files Browse the repository at this point in the history
* add a time argument to EJS_emulator.displayMessage()

* Fix contributors/add new

* make sure time is bigger than 0
  • Loading branch information
allancoding committed Feb 6, 2024
1 parent 29dff80 commit 0555435
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/emulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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() {
Expand Down
7 changes: 5 additions & 2 deletions docs/Contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>


Expand Down Expand Up @@ -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 }----------------------------------->

Expand Down

0 comments on commit 0555435

Please sign in to comment.