Mercurial Hosting > chat
diff src/chat.js @ 56:323ddacc1593
start invite
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 04 Mar 2025 07:00:42 -0700 |
parents | 1d724f187cff |
children | 8270106644db |
line wrap: on
line diff
--- a/src/chat.js Mon Mar 03 21:42:38 2025 -0700 +++ b/src/chat.js Tue Mar 04 07:00:42 2025 -0700 @@ -268,3 +268,15 @@ span.setAttribute('unread',n); span.textContent = n; } + +function invite() { + let email = document.querySelector('input[type=email]').value; + ajax(`invite.js?email=${encodeURIComponent(email)}`); +} + +function openInvite(email) { + let dialog = document.querySelector('dialog[invite]'); + let span = dialog.querySelector('span[email]'); + span.textContent = email; + openModal(dialog); +}