client: Rename option to codeBlockTheme

This commit is contained in:
Elian Doran
2024-10-27 21:39:50 +02:00
parent e68d070320
commit 96b9042559
4 changed files with 9 additions and 5 deletions

View File

@@ -98,7 +98,7 @@ const HIGHLIGHT_JS = {
}
}
const currentTheme = optionsService.get("highlightingTheme");
const currentTheme = optionsService.get("codeBlockTheme");
loadHighlightingTheme(currentTheme);
return Array.from(scriptsToLoad);
@@ -158,6 +158,10 @@ async function requireCss(url, prependAssetPath = true) {
let highlightingThemeEl = null;
function loadHighlightingTheme(theme) {
if (!theme) {
return;
}
if (!highlightingThemeEl) {
highlightingThemeEl = $(`<link rel="stylesheet" type="text/css" />`);
$("head").append(highlightingThemeEl);