theme fixes

This commit is contained in:
Piyush मिश्रः 2021-05-14 22:59:26 +05:30
parent 04e81e3ec0
commit af7a174df8
1 changed files with 2 additions and 2 deletions

View File

@ -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 "";
}
}