Software /
code /
prosody-modules
File
mod_http_muc_log/static/timestamps.js @ 5104:d4b0a995e5e3
mod_http_muc_log: Move CSS and JS out of template
This allows applying different cache and security policies to the static
resources, while reducing the size of all pages.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 04 Dec 2022 22:10:07 +0100 |
parent | 4990:mod_http_muc_log/res/http_muc_log.html@d55b10878e43 |
child | 5106:630887a50a7d |
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()); } } document.forms[0].elements.p.addEventListener("change", function() { document.forms[0].submit(); }); })();