Update 1.js
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
function setThemeColor() {
|
function setThemeColor() {
|
||||||
const metaThemeColor = document.querySelector('meta[name="theme-color"]');
|
const metaThemeColor = document.querySelector('meta[name="theme-color"]');
|
||||||
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
metaThemeColor.setAttribute('content', isDarkMode ? '#000000' : '#100f2c');
|
metaThemeColor.setAttribute('content', isDarkMode ? '#100f2c' : '#100f2c');
|
||||||
}
|
}
|
||||||
|
|
||||||
setThemeColor();
|
setThemeColor();
|
||||||
|
|||||||
Reference in New Issue
Block a user