Attempt to fix iOS status bar color

This commit is contained in:
Lim Chee Aun 2023-12-31 08:02:32 +08:00
parent c3e40297e0
commit f056d7407a
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@
name="theme-color"
data-theme-setting="auto"
content="#fff"
data-content="#fff"
data-content-temp="#ffff"
media="(prefers-color-scheme: light)"
/>
@ -38,6 +39,7 @@
name="theme-color"
data-theme-setting="auto"
content="#242526"
data-content="#242526"
data-content-temp="#242526ff"
media="(prefers-color-scheme: dark)"
/>

View file

@ -224,7 +224,7 @@ if (isIOS) {
`meta[name="theme-color"][media*="${colorScheme}"]`,
);
if ($meta) {
const color = $meta.content;
const color = $meta.dataset.content;
const tempColor = $meta.dataset.contentTemp;
$meta.content = tempColor || '';
setTimeout(() => {