Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | /chat: add pikchr click handlers to incoming messages. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | chat-markdown |
| Files: | files | file ages | folders |
| SHA3-256: |
326eccf24540c8d40b7e0cd126567b24 |
| User & Date: | stephan 2021-09-20 11:28:16.414 |
Context
|
2021-09-20
| ||
| 12:14 | Merge trunk changes into the chat-markdown branch. ... (check-in: 807b8d9bf4 user: drh tags: chat-markdown) | |
| 11:28 | /chat: add pikchr click handlers to incoming messages. ... (check-in: 326eccf245 user: stephan tags: chat-markdown) | |
|
2021-09-19
| ||
| 07:28 | Applied patch from Warren at [forum:26371e6b32cb4ebc] to resolve the new behavior of markdown catching message prefixes of #NNN as a header. ... (check-in: 408d584e21 user: stephan tags: chat-markdown) | |
Changes
Changes to src/chat.c.
| ︙ | ︙ | |||
186 187 188 189 190 191 192 | @ <button>Close</button> @ </div> @ <div id='chat-messages-wrapper'> /* New chat messages get inserted immediately after this element */ @ <span id='message-inject-point'></span> @ </div> fossil_free(zProjectName); | | > | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
@ <button>Close</button>
@ </div>
@ <div id='chat-messages-wrapper'>
/* New chat messages get inserted immediately after this element */
@ <span id='message-inject-point'></span>
@ </div>
fossil_free(zProjectName);
builtin_fossil_js_bundle_or("popupwidget", "storage",
"fetch", "pikchr", NULL);
/* Always in-line the javascript for the chat page */
@ <script nonce="%h(style_nonce())">/* chat.c:%d(__LINE__) */
/* We need an onload handler to ensure that window.fossil is
initialized before the chat init code runs. */
@ window.addEventListener('load', function(){
@ document.body.classList.add('chat')
@ /*^^^for skins which add their own BODY tag */;
|
| ︙ | ︙ |
Changes to src/chat.js.
| ︙ | ︙ | |||
679 680 681 682 683 684 685 686 687 688 689 690 691 692 |
// Hence, even though innerHTML is normally frowned upon, it is
// perfectly safe to use in this context.
if(m.xmsg instanceof Array){
// Used by Chat.reportErrorAsMessage()
D.append(contentTarget, m.xmsg);
}else{
contentTarget.innerHTML = m.xmsg;
}
}
this.e.tab.addEventListener('click', this._handleLegendClicked, false);
if(eXFrom){
eXFrom.addEventListener('click', ()=>this.e.tab.click(), false);
}
return this;
| > > > | 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
// Hence, even though innerHTML is normally frowned upon, it is
// perfectly safe to use in this context.
if(m.xmsg instanceof Array){
// Used by Chat.reportErrorAsMessage()
D.append(contentTarget, m.xmsg);
}else{
contentTarget.innerHTML = m.xmsg;
if(F.pikchr){
F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr'));
}
}
}
this.e.tab.addEventListener('click', this._handleLegendClicked, false);
if(eXFrom){
eXFrom.addEventListener('click', ()=>this.e.tab.click(), false);
}
return this;
|
| ︙ | ︙ |