view mod_http_muc_log/static/timestamps.js @ 5473:e4382f6e3564

mod_http_oauth2: Tweak formatting of log message No need to `or ""` anymore since Prosody rev e88db5668cfb (0.11.0) and the %q format should produce either (nil) or "http://example"
author Kim Alvefur <zash@zash.se>
date Thu, 18 May 2023 13:27:27 +0200
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();
});
}
})();