mirror of https://github.com/vector-im/riot-web
set the meta tag for theme-color to the same theme css background
parent
14516d3e7e
commit
1767a611a6
|
@ -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 New Issue