mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
10 lines
393 B
JavaScript
10 lines
393 B
JavaScript
|
function toggleDarkMode() {
|
||
|
document.body.classList.toggle("dark");
|
||
|
var currentCSS = document.getElementById("highlight-css");
|
||
|
if (currentCSS.getAttribute("href") === "file/css/highlightjs/github-dark.min.css") {
|
||
|
currentCSS.setAttribute("href", "file/css/highlightjs/github.min.css");
|
||
|
} else {
|
||
|
currentCSS.setAttribute("href", "file/css/highlightjs/github-dark.min.css");
|
||
|
}
|
||
|
}
|