Mercurial > prosody-modules
annotate mod_http_muc_log/static/timestamps.js @ 5801:73887dcb2129
mod_pubsub_serverinfo: New module that uses pub/sub to make accessible server info
This first implemetnation is laughably simple: it only adds a disco#info
feature. This flags 'opt-in' for inclusion of local domain names in the
data exposed by other domains (per the domain), which will allow servers to
be listed in the XMPP Network Graph at https://xmppnetwork.goodbytes.im
Hopefully, this bare-boned implementation acts as a stepping stone for
future improvements.
author | Guus der Kinderen <guus.der.kinderen@gmail.com> |
---|---|
date | Thu, 28 Dec 2023 11:02:35 +0100 |
parents | 7bce75e74f86 |
children |
rev | line source |
---|---|
1582
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 /* |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 * Local timestamps |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 */ |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 (function () { |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 var timeTags = document.getElementsByTagName("time"); |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 var i = 0, tag, date; |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 while(timeTags[i]) { |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 tag = timeTags[i++]; |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 if(date = tag.getAttribute("datetime")) { |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 date = new Date(date); |
1915
5e65c91c07c4
mod_http_muc_log: Produce local timestamps in local format
Kim Alvefur <zash@zash.se>
parents:
1751
diff
changeset
|
11 tag.textContent = date.toLocaleTimeString(navigator.language); |
1582
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 tag.setAttribute("title", date.toString()); |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 } |
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 } |
5106
630887a50a7d
mod_http_muc_log: Fix error in js when displaying presence is disabled
Kim Alvefur <zash@zash.se>
parents:
5104
diff
changeset
|
15 if(document.forms.length>0){ |
3485
181561d0aae5
mod_http_muc_log: Add functionality for hiding joins and parts
Kim Alvefur <zash@zash.se>
parents:
2083
diff
changeset
|
16 document.forms[0].elements.p.addEventListener("change", function() { |
181561d0aae5
mod_http_muc_log: Add functionality for hiding joins and parts
Kim Alvefur <zash@zash.se>
parents:
2083
diff
changeset
|
17 document.forms[0].submit(); |
5109
650d04984e0b
mod_http_muc_log: Fix syntax error in timestamp adjusting script
Kim Alvefur <zash@zash.se>
parents:
5106
diff
changeset
|
18 }); |
5106
630887a50a7d
mod_http_muc_log: Fix error in js when displaying presence is disabled
Kim Alvefur <zash@zash.se>
parents:
5104
diff
changeset
|
19 } |
1582
8e282eb0c70c
mod_http_muc_log: Split out template into a configurable file.
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 })(); |
5104
d4b0a995e5e3
mod_http_muc_log: Move CSS and JS out of template
Kim Alvefur <zash@zash.se>
parents:
4990
diff
changeset
|
21 |