From a80046f618eba4e39db1a6edd94ac523043eb848 Mon Sep 17 00:00:00 2001 From: Fernando Mejia <66635444+ferantoMSFT@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:58:43 +0000 Subject: [PATCH] when using dark mode , white flash appears #17 --- _includes/js/custom.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/_includes/js/custom.js b/_includes/js/custom.js index c74b701b..a99a4d61 100644 --- a/_includes/js/custom.js +++ b/_includes/js/custom.js @@ -1,12 +1,12 @@ - window.matchMedia('(prefers-color-scheme: dark)') - .addEventListener('change', event => { - if (event.matches) { - jtd.setTheme('dark'); - } else { - jtd.setTheme('light'); - } - }); +// window.matchMedia('(prefers-color-scheme: dark)') +// .addEventListener('change', event => { +// if (event.matches) { +// jtd.setTheme('dark'); +// } else { +// jtd.setTheme('light'); +// } +// }); - if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { - jtd.setTheme('dark'); - } \ No newline at end of file +// if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { +// jtd.setTheme('dark'); +// } \ No newline at end of file