mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 09:18:51 +01:00
Test better temp color for refreshing theme-color
This commit is contained in:
parent
92d6fe7ebe
commit
3e4e4d179b
1 changed files with 10 additions and 1 deletions
11
src/app.jsx
11
src/app.jsx
|
@ -204,7 +204,16 @@ if (isIOS) {
|
||||||
);
|
);
|
||||||
const color = $meta?.getAttribute('content');
|
const color = $meta?.getAttribute('content');
|
||||||
if (color) {
|
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(() => {
|
setTimeout(() => {
|
||||||
$meta.content = color;
|
$meta.content = color;
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
Loading…
Reference in a new issue