From af7a174df87da4ad8297528ceba4ec3c103ed2a7 Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Fri, 14 May 2021 22:59:26 +0530 Subject: [PATCH] theme fixes --- static/js/onload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}