Skip to content

Commit 9055478

Browse files
shiyanmaiazkqiang
authored andcommitted
🐛 修复移动端切换暗色
1 parent ee92478 commit 9055478

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/js/color-schema.js

+4
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@
176176
}
177177
});
178178
}
179+
if (document.documentElement.getAttribute('data-user-color-scheme')) {
180+
let color = getComputedStyle(document.documentElement).getPropertyValue('--navbar-bg-color').trim()
181+
document.querySelector('meta[name="theme-color"]').setAttribute("content", color)
182+
}
179183
}
180184
}
181185

0 commit comments

Comments
 (0)