From 6dc87d2a31a3931b95df26db3d7f9ac5607e88a5 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 15 Feb 2022 23:07:17 +0300 Subject: [PATCH] expose `dark` class on html --- js/dark-themer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/dark-themer.js b/js/dark-themer.js index 0b473bf8..8fc09846 100644 --- a/js/dark-themer.js +++ b/js/dark-themer.js @@ -1,3 +1,4 @@ +/* global $ */// dom.js /* global API msg */// msg.js 'use strict'; @@ -20,6 +21,7 @@ API.colorScheme.shouldIncludeStyle('darkUI').then(val => { } }); function toggleDarkStyles() { + $.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) {