view mod_http_muc_log/static/timestamps.js @ 5729:79ba1a1a75cc

mod_storage_xmlarchive: Fix "user" iteration API Fixes use in prosody-migrator. Otherwise this particular API is not used much, or this would have been noticed before. Usually it is a different store like 'accounts' that is responsible for providing the authoritative list of users. Thanks Ge0rG for testing
author Kim Alvefur <zash@zash.se>
date Thu, 23 Nov 2023 16:16:34 +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();
});
}
})();