MediaWiki:Gadget-DotsSyntaxHighlighter.js: Difference between revisions

no edit summary
mNo edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 542: Line 542:
         window.syntaxHighlighterSiteConfig = window.syntaxHighlighterSiteConfig || {};
         window.syntaxHighlighterSiteConfig = window.syntaxHighlighterSiteConfig || {};
         window.syntaxHighlighterConfig = window.syntaxHighlighterConfig || {};
         window.syntaxHighlighterConfig = window.syntaxHighlighterConfig || {};
        var tone6 = getComputedStyle(document.body).getPropertyValue('--theme-tone-6');


         //use 3-digit colors instead of 6-digit colors for performance
         //use 3-digit colors instead of 6-digit colors for performance
         configureColor("backgroundColor",    "#FFF",  false); //white
         if ($('body').hasClass('dark-mode')) {
        configureColor("foregroundColor",    "#000",  false); //black
            configureColor("backgroundColor",    tone6,  false); //white
        configureColor("boldOrItalicColor",  "#EEE",  true);  //gray
            configureColor("foregroundColor",    "#FFF",  false); //black
        configureColor("commentColor",      "#EFE",  true);  //green
            configureColor("boldOrItalicColor",  "#444",  true);  //gray
        configureColor("entityColor",        "#DFD",  true);  //green
            configureColor("commentColor",      "#4d745d",  true);  //green
        configureColor("externalLinkColor",  "#EFF",  true);  //cyan
            configureColor("entityColor",        "#556c55",  true);  //green
        configureColor("headingColor",      "#EEE",  true);  //gray
            configureColor("externalLinkColor",  "#485959",  true);  //cyan
        configureColor("hrColor",            "#EEE",  true);  //gray
            configureColor("headingColor",      "#444",  true);  //gray
        configureColor("listOrIndentColor",  "#EFE",  true);  //green
            configureColor("hrColor",            "#444",  true);  //gray
        configureColor("parameterColor",    "#FC6",  true);  //orange
            configureColor("listOrIndentColor",  "#4d745d",  true);  //green
        configureColor("signatureColor",    "#FC6",  true);  //orange
            configureColor("parameterColor",    "#6e5e36",  true);  //orange
        configureColor("tagColor",          "#FEF",  true);  //pink
            configureColor("signatureColor",    "#6e5e36",  true);  //orange
        configureColor("tableColor",        "#FFC",  true);  //yellow
            configureColor("tagColor",          "#4f364f",  true);  //pink
        configureColor("templateColor",      "#FFC",  true);  //yellow
            configureColor("tableColor",        "#3f3f31",  true);  //yellow
        configureColor("wikilinkColor",      "#EEF",  true);  //blue
            configureColor("templateColor",      "#3f3f31",  true);  //yellow
            configureColor("wikilinkColor",      "#5d5d6c",  true);  //blue
        } else {
            configureColor("backgroundColor",    "#FFF",  false); //white
            configureColor("foregroundColor",    "#000",  false); //black
            configureColor("boldOrItalicColor",  "#EEE",  true);  //gray
            configureColor("commentColor",      "#EFE",  true);  //green
            configureColor("entityColor",        "#DFD",  true);  //green
            configureColor("externalLinkColor",  "#EFF",  true);  //cyan
            configureColor("headingColor",      "#EEE",  true);  //gray
            configureColor("hrColor",            "#EEE",  true);  //gray
            configureColor("listOrIndentColor",  "#EFE",  true);  //green
            configureColor("parameterColor",    "#FC6",  true);  //orange
            configureColor("signatureColor",    "#FC6",  true);  //orange
            configureColor("tagColor",          "#FEF",  true);  //pink
            configureColor("tableColor",        "#FFC",  true);  //yellow
            configureColor("templateColor",      "#FFC",  true);  //yellow
            configureColor("wikilinkColor",      "#EEF",  true);  //blue
        }
       


         //tag lists are ordered from most common to least common
         //tag lists are ordered from most common to least common