[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:
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'
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user