abtmtr-v4/views/scripts/interface.js

13 lines
397 B
JavaScript
Raw Normal View History

function propagateStyles(rootStyles, parent) {
if (parent == null && window.frameElement == null) return;
const wfParent = parent ?? window.frameElement.parentElement;
2023-11-23 08:53:28 +00:00
wfParent.style.setProperty(
2023-12-21 18:14:12 +00:00
"--base-color",
rootStyles.getPropertyValue("--base-color")
2023-11-23 08:53:28 +00:00
);
}
2023-12-01 04:48:59 +00:00
window.addEventListener("DOMContentLoaded", () => {
2023-11-23 08:53:28 +00:00
propagateStyles(getComputedStyle(document.documentElement));
});