diff --git a/static/js/onload.js b/static/js/onload.js index 9817072..320c081 100644 --- a/static/js/onload.js +++ b/static/js/onload.js @@ -1,4 +1,4 @@ -if (getCookie('theme') == 'dark' || window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { +if (getCookie('theme') == 'dark' || (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches && getCookie('theme') != 'light')) { $('body').toggleClass('dark'); } @@ -68,4 +68,4 @@ function getCookie(cname) { } } return ""; -} \ No newline at end of file +}