Skip to content

Commit

Permalink
improve lost connection display
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdata committed Oct 12, 2023
1 parent a31f51b commit 343136b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jaws.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,13 @@ function jawsLost() {
innerHTML += '. Trying to reconnect.';
var elem = document.getElementById('jaws-lost');
if (elem == null) {
elem = jawsElement('<div id="jaws-lost" style="height: 3em; display: flex; justify-content: center; align-items: center; background-color: red; color: white"></div>');
elem = jawsElement('<div id="jaws-lost" style="height: 3em; display: flex; justify-content: center; align-items: center; background-color: red; color: white">' +
innerHTML + '</div>');
document.body.prepend(elem);
document.body.scrollTop = document.documentElement.scrollTop = 0;
} else {
elem.innerHTML = innerHTML;
}
elem.innerHTML = innerHTML;
setTimeout(jawsReconnect, delay * 1000);
}

Expand Down

0 comments on commit 343136b

Please sign in to comment.