Differences From Artifact [dacc39e008]:
- File src/chat.js — part of check-in [822653c269] at 2020-12-24 13:44:30 on branch trunk — Hyperlink processing for chat messages is now handled on the server side, where we have knowledge of interwiki links, wiki page names, and valid artifact hashes. (user: drh size: 13375)
To Artifact [7f615e6c24]:
- File src/chat.js — part of check-in [ebdd91b92f] at 2020-12-24 15:10:38 on branch trunk — The ping=TCPPORT query parameter to /chat causes a call to /chat-ping on localhost and the given port whenever new chat content arrives. Can be used for notifications. (user: drh size: 13503)
| ︙ | |||
358 359 360 361 362 363 364 365 366 367 368 369 370 371 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | + + + |
//
// Hence, even though innerHTML is normally frowned upon, it is
// perfectly safe to use in this context.
eContent.innerHTML += m.xmsg
}
eContent.classList.add('chat-message');
}
if(i && window.fossil.config.pingTcp){
fetch("http:/"+"/localhost:"+window.fossil.config.pingTcp+"/chat-ping");
}
}
async function poll(){
if(poll.running) return;
poll.running = true;
fetch("chat-poll?name=" + Chat.mxMsg)
.then(x=>x.json())
.then(y=>newcontent(y))
|
| ︙ |