Fossil SCM

Simplify the previous checkin a bit - we do not need to persist the CSS class list in the window.fossil object.

stephan 2026-07-07 08:20 UTC trunk
Commit 12bb89d436bd5220200075e410073791961212d87d26c9998f2e6207a2f41cc7
1 file changed +2 -3
+2 -3
--- src/builtin.c
+++ src/builtin.c
@@ -706,15 +706,14 @@
706706
** the BODY element's CSS classes set so that various CSS selectors
707707
** and JS-side filters will work. */
708708
char *pSlash = strchr(g.zPath,'/')/*hack taken from style.c*/;
709709
if( pSlash ) *pSlash = 0;
710710
Th_Store("requested_page", escape_quotes(g.zPath));
711
- CX("window.fossil.pageClasses = [%!j, \"rpage-%j\","
712
- "\"cpage-%j\"];\n",
711
+ CX("document.body.classList.add(%!j, \"rpage-%j\","
712
+ "\"cpage-%j\");\n",
713713
style_get_current_feature(), g.zPath, g.zPhase+1);
714714
if( pSlash ) *pSlash = '/';
715
- CX("document.body.classList.add(...window.fossil.pageClasses);\n");
716715
}
717716
CX("if(fossil.config.skin.isDark) "
718717
"document.body.classList.add('fossil-dark-style');\n");
719718
/*
720719
** fossil.page holds info about the current page. This is also
721720
--- src/builtin.c
+++ src/builtin.c
@@ -706,15 +706,14 @@
706 ** the BODY element's CSS classes set so that various CSS selectors
707 ** and JS-side filters will work. */
708 char *pSlash = strchr(g.zPath,'/')/*hack taken from style.c*/;
709 if( pSlash ) *pSlash = 0;
710 Th_Store("requested_page", escape_quotes(g.zPath));
711 CX("window.fossil.pageClasses = [%!j, \"rpage-%j\","
712 "\"cpage-%j\"];\n",
713 style_get_current_feature(), g.zPath, g.zPhase+1);
714 if( pSlash ) *pSlash = '/';
715 CX("document.body.classList.add(...window.fossil.pageClasses);\n");
716 }
717 CX("if(fossil.config.skin.isDark) "
718 "document.body.classList.add('fossil-dark-style');\n");
719 /*
720 ** fossil.page holds info about the current page. This is also
721
--- src/builtin.c
+++ src/builtin.c
@@ -706,15 +706,14 @@
706 ** the BODY element's CSS classes set so that various CSS selectors
707 ** and JS-side filters will work. */
708 char *pSlash = strchr(g.zPath,'/')/*hack taken from style.c*/;
709 if( pSlash ) *pSlash = 0;
710 Th_Store("requested_page", escape_quotes(g.zPath));
711 CX("document.body.classList.add(%!j, \"rpage-%j\","
712 "\"cpage-%j\");\n",
713 style_get_current_feature(), g.zPath, g.zPhase+1);
714 if( pSlash ) *pSlash = '/';
 
715 }
716 CX("if(fossil.config.skin.isDark) "
717 "document.body.classList.add('fossil-dark-style');\n");
718 /*
719 ** fossil.page holds info about the current page. This is also
720

Keyboard Shortcuts

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