abtmtr-v4/views/scripts/interface.js

12 lines
397 B
JavaScript
Executable file

function propagateStyles(rootStyles, parent) {
if (parent == null && window.frameElement == null) return;
const wfParent = parent ?? window.frameElement.parentElement;
wfParent.style.setProperty(
"--base-color",
rootStyles.getPropertyValue("--base-color")
);
}
window.addEventListener("DOMContentLoaded", () => {
propagateStyles(getComputedStyle(document.documentElement));
});