Mercurial Hosting > chat
comparison 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 |
comparison
equal
deleted
inserted
replaced
55:d21ae4920aac | 56:323ddacc1593 |
---|---|
266 let span = div.querySelector('span[unread]'); | 266 let span = div.querySelector('span[unread]'); |
267 let n = parseInt(span.getAttribute('unread')) + 1; | 267 let n = parseInt(span.getAttribute('unread')) + 1; |
268 span.setAttribute('unread',n); | 268 span.setAttribute('unread',n); |
269 span.textContent = n; | 269 span.textContent = n; |
270 } | 270 } |
271 | |
272 function invite() { | |
273 let email = document.querySelector('input[type=email]').value; | |
274 ajax(`invite.js?email=${encodeURIComponent(email)}`); | |
275 } | |
276 | |
277 function openInvite(email) { | |
278 let dialog = document.querySelector('dialog[invite]'); | |
279 let span = dialog.querySelector('span[email]'); | |
280 span.textContent = email; | |
281 openModal(dialog); | |
282 } |