Fossil SCM
Simplify the previous checkin a bit - we do not need to persist the CSS class list in the window.fossil object.
Commit
12bb89d436bd5220200075e410073791961212d87d26c9998f2e6207a2f41cc7
Parent
c9525608f061213…
1 file changed
+2
-3
+2
-3
| --- src/builtin.c | ||
| +++ src/builtin.c | ||
| @@ -706,15 +706,14 @@ | ||
| 706 | 706 | ** the BODY element's CSS classes set so that various CSS selectors |
| 707 | 707 | ** and JS-side filters will work. */ |
| 708 | 708 | char *pSlash = strchr(g.zPath,'/')/*hack taken from style.c*/; |
| 709 | 709 | if( pSlash ) *pSlash = 0; |
| 710 | 710 | 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", | |
| 713 | 713 | style_get_current_feature(), g.zPath, g.zPhase+1); |
| 714 | 714 | if( pSlash ) *pSlash = '/'; |
| 715 | - CX("document.body.classList.add(...window.fossil.pageClasses);\n"); | |
| 716 | 715 | } |
| 717 | 716 | CX("if(fossil.config.skin.isDark) " |
| 718 | 717 | "document.body.classList.add('fossil-dark-style');\n"); |
| 719 | 718 | /* |
| 720 | 719 | ** fossil.page holds info about the current page. This is also |
| 721 | 720 |
| --- 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 |