Use dark fullscreen background in embeds by default if user prefers dark mode
This commit is contained in:
1 parent
8d80a12d9d
commit
af62b738d2
1 file changed
+3
@@ -58,6 +58,9 @@ const getFullscreenBackgroundColor = () => {
|
||||
if (params.has('fullscreen-background')) {
|
||||
return params.get('fullscreen-background');
|
||||
}
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
return '#111';
|
||||
}
|
||||
return 'white';
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user