fix style initialization
This commit is contained in:
parent
3c563c78d4
commit
68e44e0e80
@ -257,8 +257,15 @@ function init() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (document.documentElement.getAttribute("data-taler-nojs")) {
|
if (document.documentElement.getAttribute("data-taler-nojs")) {
|
||||||
initStyle();
|
const onload = () => {
|
||||||
setStyles(true);
|
initStyle();
|
||||||
|
setStyles(true);
|
||||||
|
};
|
||||||
|
if (document.readyState == "complete") {
|
||||||
|
onload();
|
||||||
|
} else {
|
||||||
|
document.addEventListener("DOMContentLoaded", onload);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
registerHandlers();
|
registerHandlers();
|
||||||
// Hack to know when the extension is unloaded
|
// Hack to know when the extension is unloaded
|
||||||
|
Loading…
Reference in New Issue
Block a user