Mercurial > xmpp-account-manager
changeset 42:fe59565063af
mathieui: Add our current JID in the top bar.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 23 May 2020 18:41:45 +0200 |
parents | 6a42b1783c9d |
children | aff7caa10489 |
files | client.js |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client.js +++ b/client.js @@ -118,6 +118,12 @@ document.addEventListener('DOMContentLoa function onConnected() { + const new_node = document.createElementNS('http://www.w3.org/1999/xhtml', 'span'); + const parent_node = connect.parentNode; + const text = document.createTextNode('Logged in as ' + connection.authzid + ' '); + new_node.appendChild(text); + parent_node.insertBefore(new_node, connect); + jid_element.hidden = true; pass_element.hidden = true; connected_div.hidden = false;