Mercurial > prosody-modules
view mod_http_muc_log/static/timestamps.js @ 5237:3354f943c1fa
mod_http_oauth2: Require URL to client informational page in registration
Since it's used without fallback in the template, seems someone expected
this to always be there, and we might as well.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 11 Mar 2023 21:13:00 +0100 |
parents | 7bce75e74f86 |
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(); }); } })();