ElEditors, Interface administrators, Administrators
70,975
edits
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("backgroundColor", tone6, false); //white | |||
configureColor("foregroundColor", "#FFF", false); //black | |||
configureColor("boldOrItalicColor", "#444", true); //gray | |||
configureColor("commentColor", "#4d745d", true); //green | |||
configureColor("entityColor", "#556c55", true); //green | |||
configureColor("externalLinkColor", "#485959", true); //cyan | |||
configureColor("headingColor", "#444", true); //gray | |||
configureColor("hrColor", "#444", true); //gray | |||
configureColor("listOrIndentColor", "#4d745d", true); //green | |||
configureColor("parameterColor", "#6e5e36", true); //orange | |||
configureColor("signatureColor", "#6e5e36", true); //orange | |||
configureColor("tagColor", "#4f364f", true); //pink | |||
configureColor("tableColor", "#3f3f31", true); //yellow | |||
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 |