Mercurial Hosting > chat
comparison src/chat.js @ 81:a0d3477d5694
minor
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Mon, 10 Mar 2025 22:27:23 -0600 |
| parents | b5a316575e64 |
| children | a47036fd0158 |
comparison
equal
deleted
inserted
replaced
| 80:cb2808b8b1ad | 81:a0d3477d5694 |
|---|---|
| 417 old.outerHTML = ''; | 417 old.outerHTML = ''; |
| 418 } | 418 } |
| 419 //console.log('readUpTo'); | 419 //console.log('readUpTo'); |
| 420 let html = `<div user="${userId}" unread="${unread}">read by ${userNameHtml}</div>`; | 420 let html = `<div user="${userId}" unread="${unread}">read by ${userNameHtml}</div>`; |
| 421 div.insertAdjacentHTML('beforeend',html); | 421 div.insertAdjacentHTML('beforeend',html); |
| 422 if( !old ) { | |
| 423 let dy = document.querySelector('div[unread]').clientHeight; | |
| 424 document.querySelector('div[main]').scrollBy(0,dy); | |
| 425 } | |
| 422 } | 426 } |
| 423 | 427 |
| 424 function replyPost(el) { | 428 function replyPost(el) { |
| 425 let postId = getPostId(el); | 429 let postId = getPostId(el); |
| 426 let div = document.querySelector('div[reply]'); | 430 let div = document.querySelector('div[reply]'); |
