Mercurial > prosody-modules
view mod_http_muc_log/static/timestamps.js @ 5118:7bce75e74f86
Merge
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 18 Dec 2022 15:30:02 +0100 |
parents | mod_http_muc_log/res/http_muc_log.html@d55b10878e43 mod_http_muc_log/res/http_muc_log.html@650d04984e0b |
children |
line wrap: on
line source
/* * Local timestamps */ (function () { var timeTags = document.getElementsByTagName("time"); var i = 0, tag, date; while(timeTags[i]) { tag = timeTags[i++]; if(date = tag.getAttribute("datetime")) { date = new Date(date); tag.textContent = date.toLocaleTimeString(navigator.language); tag.setAttribute("title", date.toString()); } } if(document.forms.length>0){ document.forms[0].elements.p.addEventListener("change", function() { document.forms[0].submit(); }); } })();