[Glitch] Fix inversion of emoji colours based on dark/light mode

Port 591776d7ad to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion authored and Claire committed 2025-12-05 20:05:32 +01:00
1 parent 05691293f0
commit c3f254f170
14 files changed
+84 -29

No files matched your search

@@ -0,0 +1,13 @@
export function getUserTheme() {
const { userTheme } = document.documentElement.dataset;
return userTheme;
}
export function isDarkMode() {
const { userTheme } = document.documentElement.dataset;
return (
(userTheme === 'system' &&
window.matchMedia('(prefers-color-scheme: dark)').matches) ||
userTheme !== 'mastodon-light'
);
}