From 77562ecd8d3c18734c83df7de60fc2a661e137cc Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 18 Feb 2022 04:35:36 +0300 Subject: [PATCH] fix light mode in dark system --- js/dark-themer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dark-themer.js b/js/dark-themer.js index 8fc09846..400c53a3 100644 --- a/js/dark-themer.js +++ b/js/dark-themer.js @@ -24,7 +24,7 @@ API.colorScheme.shouldIncludeStyle('darkUI').then(val => { $.root.dataset.uiTheme = isDark ? 'dark' : 'light'; for (const sheet of document.styleSheets) { for (const {media: m} of sheet.cssRules) { - if (m && m[1] === 'dark' && (m[0] === 'screen') !== isDark) { + if (m && m[1] === 'dark' && /screen/.test(m[0]) !== isDark) { m.mediaText = isDark ? 'screen,dark' : 'not all,dark'; } }