]> git.cworth.org Git - lmno.games/blobdiff - scribe/scribe.jsx
Delay the "Connection lost" message by a second
[lmno.games] / scribe / scribe.jsx
index 81296dc900194121a76d1ce2a842803451ea33e4..06a8541297059bdc046f6f40ae3ac129d8ff2e74 100644 (file)
@@ -26,7 +26,9 @@ const events = new EventSource("events");
 
 events.onerror = function(event) {
   if (event.target.readyState === EventSource.CLOSED) {
+    setTimeout(() => {
       add_message("danger", "Connection to server lost.");
+    }, 1000);
   }
 };