});
});
-export function setup(): void {
+function observeElements(): void {
document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((el) => {
el.classList.remove("jsReloadPageWhenEmpty");
observer.observe(el, {
childList: true,
});
});
-
- DomChangeListener.add("WoltLabSuite/Core/Ui/Empty", () => setup());
+}
+export function setup(): void {
+ observeElements();
+ DomChangeListener.add("WoltLabSuite/Core/Ui/Empty", () => observeElements());
}
}
});
});
- function setup() {
+ function observeElements() {
document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((el) => {
el.classList.remove("jsReloadPageWhenEmpty");
observer.observe(el, {
childList: true,
});
});
- Listener_1.default.add("WoltLabSuite/Core/Ui/Empty", () => setup());
+ }
+ function setup() {
+ observeElements();
+ Listener_1.default.add("WoltLabSuite/Core/Ui/Empty", () => observeElements());
}
exports.setup = setup;
});