Test better temp color for refreshing theme-color
This commit is contained in:
parent
92d6fe7ebe
commit
3e4e4d179b
11
src/app.jsx
11
src/app.jsx
|
@ -204,7 +204,16 @@ if (isIOS) {
|
|||
);
|
||||
const color = $meta?.getAttribute('content');
|
||||
if (color) {
|
||||
$meta.content = '';
|
||||
let tempColor;
|
||||
if (/^#/.test(color)) {
|
||||
// Assume either #RBG or #RRGGBB
|
||||
if (color.length === 4) {
|
||||
tempColor = color + 'f';
|
||||
} else if (color.length === 7) {
|
||||
tempColor = color + 'ff';
|
||||
}
|
||||
}
|
||||
$meta.content = tempColor || '';
|
||||
setTimeout(() => {
|
||||
$meta.content = color;
|
||||
}, 10);
|
||||
|
|
Loading…
Reference in a new issue