Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
function setColorMode(mode) {
// Switch between light/dark theme. `mode` is a string value of either 'dark' or 'light'.
document.documentElement.setAttribute('data-bs-theme', mode);
var hljs_light = document.getElementById('hljs-light'),
hljs_dark = document.getElementById('hljs-dark');
document.documentElement.setAttribute('data-bs-theme', mode);
if (hljs_light == null || hljs_dark == null) {
return;
}
if (mode == 'dark') {
hljs_light.disabled = true;
hljs_dark.disabled = false;
Expand Down
Loading