mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
set the meta tag for theme-color to the same theme css background
This commit is contained in:
parent
14516d3e7e
commit
1767a611a6
1 changed files with 4 additions and 0 deletions
|
@ -242,6 +242,10 @@ export async function setTheme(theme) {
|
||||||
if (a == styleElements[stylesheetName]) return;
|
if (a == styleElements[stylesheetName]) return;
|
||||||
a.disabled = true;
|
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);
|
Tinter.setTheme(theme);
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue