Fossil SCM

chat app now explicitly sets the body.chat CSS class, to account for skins which include a BODY tag in their header and therefore do not get one injected by the style API.

stephan 2020-12-26 17:55 trunk
Commit feaa3b164082cecac3e6f2d00572de1d0e031639d91e280a7de191feb17a092e
1 file changed +2
+2
--- src/chat.c
+++ src/chat.c
@@ -147,10 +147,12 @@
147147
/* Always in-line the javascript for the chat page */
148148
@ <script nonce="%h(style_nonce())">/* chat.c:%d(__LINE__) */
149149
/* We need an onload handler to ensure that window.fossil is
150150
initialized before the chat init code runs. */
151151
@ window.addEventListener('load', function(){
152
+ @ document.body.classList.add('chat')
153
+ @ /*^^^for skins which add their own BODY tag */;
152154
@ window.fossil.config.chat = {
153155
@ pingTcp: %d(iPingTcp),
154156
@ initSize: %d(db_get_int("chat-initial-history",50)),
155157
@ imagesInline: !!%d(db_get_boolean("chat-inline-images",1))
156158
@ };
157159
--- src/chat.c
+++ src/chat.c
@@ -147,10 +147,12 @@
147 /* Always in-line the javascript for the chat page */
148 @ <script nonce="%h(style_nonce())">/* chat.c:%d(__LINE__) */
149 /* We need an onload handler to ensure that window.fossil is
150 initialized before the chat init code runs. */
151 @ window.addEventListener('load', function(){
 
 
152 @ window.fossil.config.chat = {
153 @ pingTcp: %d(iPingTcp),
154 @ initSize: %d(db_get_int("chat-initial-history",50)),
155 @ imagesInline: !!%d(db_get_boolean("chat-inline-images",1))
156 @ };
157
--- src/chat.c
+++ src/chat.c
@@ -147,10 +147,12 @@
147 /* Always in-line the javascript for the chat page */
148 @ <script nonce="%h(style_nonce())">/* chat.c:%d(__LINE__) */
149 /* We need an onload handler to ensure that window.fossil is
150 initialized before the chat init code runs. */
151 @ window.addEventListener('load', function(){
152 @ document.body.classList.add('chat')
153 @ /*^^^for skins which add their own BODY tag */;
154 @ window.fossil.config.chat = {
155 @ pingTcp: %d(iPingTcp),
156 @ initSize: %d(db_get_int("chat-initial-history",50)),
157 @ imagesInline: !!%d(db_get_boolean("chat-inline-images",1))
158 @ };
159

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button