mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
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:
parent
29dff80731
commit
05554354c9
2 changed files with 7 additions and 4 deletions
|
@ -729,7 +729,7 @@ class EmulatorJS {
|
||||||
saveInBrowserSupported() {
|
saveInBrowserSupported() {
|
||||||
return !!window.indexedDB && (typeof this.config.gameName === "string" || !this.config.gameUrl.startsWith("blob:"));
|
return !!window.indexedDB && (typeof this.config.gameName === "string" || !this.config.gameUrl.startsWith("blob:"));
|
||||||
}
|
}
|
||||||
displayMessage(message) {
|
displayMessage(message, time) {
|
||||||
if (!this.msgElem) {
|
if (!this.msgElem) {
|
||||||
this.msgElem = this.createElement("div");
|
this.msgElem = this.createElement("div");
|
||||||
this.msgElem.classList.add("ejs_message");
|
this.msgElem.classList.add("ejs_message");
|
||||||
|
@ -738,7 +738,7 @@ class EmulatorJS {
|
||||||
clearTimeout(this.msgTimeout);
|
clearTimeout(this.msgTimeout);
|
||||||
this.msgTimeout = setTimeout(() => {
|
this.msgTimeout = setTimeout(() => {
|
||||||
this.msgElem.innerText = "";
|
this.msgElem.innerText = "";
|
||||||
}, 3000)
|
}, (typeof time === "number" && time > 0) ? time : 3000)
|
||||||
this.msgElem.innerText = message;
|
this.msgElem.innerText = message;
|
||||||
}
|
}
|
||||||
downloadStartState() {
|
downloadStartState() {
|
||||||
|
|
|
@ -68,8 +68,9 @@
|
||||||
<a href="https://github.com/Protektor-Desura" target="_blank" title="Protektor-Desura - Protektor">![Avatar Protektor]</a>
|
<a href="https://github.com/Protektor-Desura" target="_blank" title="Protektor-Desura - Protektor">![Avatar Protektor]</a>
|
||||||
<a href="https://github.com/oyepriyansh" target="_blank" title="oyepriyansh - Priyansh Prajapat">![Avatar Priyansh]</a>
|
<a href="https://github.com/oyepriyansh" target="_blank" title="oyepriyansh - Priyansh Prajapat">![Avatar Priyansh]</a>
|
||||||
<a href="https://github.com/debuggerx01" target="_blank" title="debuggerx01">![Avatar debuggerx01]</a>
|
<a href="https://github.com/debuggerx01" target="_blank" title="debuggerx01">![Avatar debuggerx01]</a>
|
||||||
<a href="https://github.com/eric183" target="_blank" title="eric183 - ericKuang">![Avatar Michael]</a>
|
<a href="https://github.com/eric183" target="_blank" title="eric183 - ericKuang">![Avatar ericKuang]</a>
|
||||||
<a href="https://github.com/michael-j-green" target="_blank" title="michael-j-green - Michael Green">![Avatar ericKuang]</a>
|
<a href="https://github.com/michael-j-green" target="_blank" title="michael-j-green - Michael Green">![Avatar Michael]</a>
|
||||||
|
<a href="https://github.com/gantoine" target="_blank" title="gantoine - Georges-Antoine Assi">![Avatar gantoine]</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,6 +102,8 @@
|
||||||
|
|
||||||
[Avatar Michael]: https://github.com/michael-j-green.png?size=95
|
[Avatar Michael]: https://github.com/michael-j-green.png?size=95
|
||||||
|
|
||||||
|
[Avatar gantoine]: https://github.com/gantoine.png?size=95
|
||||||
|
|
||||||
|
|
||||||
<!----------------------------------{ Ethan }----------------------------------->
|
<!----------------------------------{ Ethan }----------------------------------->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue