Mercurial Hosting > chat
changeset 42:e09747b199e9
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 27 Feb 2025 19:30:54 -0700 |
parents | 818697418dbe |
children | 89d3ddd302c7 |
files | src/chat.js |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/chat.js Thu Feb 27 19:05:57 2025 -0700 +++ b/src/chat.js Thu Feb 27 19:30:54 2025 -0700 @@ -218,10 +218,12 @@ } } -setInterval(function(){ +function heartbeat() { showOnline(); ajax(`heartbeat.js?last_update=${lastUpdate}`); -}, 10000 ); +} + +setInterval( heartbeat, 10000 ); let online = {}; @@ -230,7 +232,7 @@ } function showOnline() { - let old = Date.now() - 20000; + let old = Date.now() - 70000; for( let id of Object.keys(online) ) { if( online[id] < old ) delete online[id];