Skip to content
Open
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
9 changes: 8 additions & 1 deletion src/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ ${slugs

/* Step 5: enter any custom scripts you'd like */
const CUSTOM_SCRIPT = \`${customScript || ''}\`;

/* Step 6: choose default theme (light by default) */
const LIGHT_THEME_BY_DEFAULT = true

/* CONFIGURATION ENDS HERE */

Expand Down Expand Up @@ -258,7 +261,11 @@ ${slugs
el.className = 'toggle-mode';
el.addEventListener('click', toggle);
nav.appendChild(el);
onLight();
if (\${LIGHT_THEME_BY_DEFAULT}) {
onLight();
} else {
onDark();
}
}
const observer = new MutationObserver(function() {
if (redirected) return;
Expand Down