You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
set the meta tag for theme-color to the same theme css background
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user