mirror of
https://github.com/Krafpy/KSP-MGA-Planner.git
synced 2025-12-25 12:24:49 -08:00
Modified the file structure to have the `index.html` at the root of the repository. Needed for Github Pages.
18 lines
487 B
JavaScript
18 lines
487 B
JavaScript
export class ProgressMessage {
|
|
constructor(id) {
|
|
this._paragraph = document.getElementById(id);
|
|
}
|
|
enable(timeout) {
|
|
if (this._displayTimeout)
|
|
clearTimeout(this._displayTimeout);
|
|
this._displayTimeout = setTimeout(() => this._paragraph.hidden = false, timeout);
|
|
}
|
|
hide() {
|
|
clearTimeout(this._displayTimeout);
|
|
this._paragraph.hidden = true;
|
|
}
|
|
setMessage(msg) {
|
|
this._paragraph.innerHTML = msg;
|
|
}
|
|
}
|