mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +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;
|
||||
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…
Reference in a new issue