From: Scott Worley Date: Fri, 3 Aug 2012 19:22:48 +0000 (-0700) Subject: Feed the median-timestamp updates back into the UI X-Git-Url: http://git.scottworley.com/reliable-chat/commitdiff_plain/5be4c8ec1ede8eda3a9a164816cef914169a2674?ds=sidebyside Feed the median-timestamp updates back into the UI --- diff --git a/webclient/rc.html b/webclient/rc.html index 573ee6a..4137de1 100644 --- a/webclient/rc.html +++ b/webclient/rc.html @@ -195,6 +195,14 @@ history.splice(hi,1); rcaddmessagetohistory(message); } + + // Update the UI + var spans = message.UI.getElementsByTagName("span"); + for (var i in spans) { + if (spans[i].getAttribute && spans[i].getAttribute("class") == "timestamp") { + spans[i].firstChild.data = rcformattime(message.Time); + } + } } function rcreceivemessages(server, messages) {