Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
🐛 Fix #428
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Feb 21, 2019
1 parent 16a1fe0 commit cfd1f1e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/classes/terminal.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,16 @@ class Terminal {
this.onclose(e);
}
};

this.lastSoundFX = Date.now();
this.socket.addEventListener("message", e => {
window.audioManager.stdout.play();
if (Date.now() - this.lastRefit > 10000) {
let d = Date.now();

if (d - this.lastSoundFX > 30) {
window.audioManager.stdout.play();
this.lastSoundFX = d;
}
if (d - this.lastRefit > 10000) {
this.fit();
}

Expand Down

0 comments on commit cfd1f1e

Please sign in to comment.