Use dark fullscreen background in embeds by default if user prefers dark mode

This commit is contained in:
GarboMuffin committed 2022-07-27 13:22:03 -05:00
1 parent 8d80a12d9d
commit af62b738d2
1 file changed
+3
+3
View File
@@ -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';
};