Merge pull request #4554 from nimbleape/pwa-taskbar-colour-follow-theme
set the meta tag for theme-color to the same theme css background
This commit is contained in:
commit
19bb678dd6
1 changed files with 4 additions and 0 deletions
|
@ -242,6 +242,10 @@ export async function setTheme(theme) {
|
|||
if (a == styleElements[stylesheetName]) return;
|
||||
a.disabled = true;
|
||||
});
|
||||
const bodyStyles = global.getComputedStyle(document.getElementsByTagName("body")[0]);
|
||||
if (bodyStyles.backgroundColor) {
|
||||
document.querySelector('meta[name="theme-color"]').content = bodyStyles.backgroundColor;
|
||||
}
|
||||
Tinter.setTheme(theme);
|
||||
resolve();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue