Update assets/js/darkmode.js

My bad for forgetting to modify this.

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This commit is contained in:
Geoffrey Garrett 2022-07-03 13:10:50 +02:00 committed by GitHub
parent 48b8aacf07
commit b5df8a8c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ const syntaxTheme = document.querySelector("#theme-link");
if (currentTheme) { if (currentTheme) {
document.documentElement.setAttribute('saved-theme', currentTheme); document.documentElement.setAttribute('saved-theme', currentTheme);
(currentTheme === 'dark') ? syntaxTheme.href = '{{ $darkSyntax.Permalink }}' : syntaxTheme.href = '{{ $lightSyntax.Permalink }}'; syntaxTheme.href = currentTheme === 'dark' ? '{{ $darkSyntax.Permalink }}' : '{{ $lightSyntax.Permalink }}';
} }
const switchTheme = (e) => { const switchTheme = (e) => {