mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-17 17:07:07 +00:00
fix: add safer dom for analytics
This commit is contained in:
@@ -28,7 +28,15 @@ async function loadAnalyticsPageInner(): Promise<void> {
|
|||||||
});
|
});
|
||||||
document.querySelector('[data-key="analytics"]')?.classList.add("active");
|
document.querySelector('[data-key="analytics"]')?.classList.add("active");
|
||||||
|
|
||||||
const main = (await waitForElm("#main", true, 100, 60)) as HTMLElement;
|
let main: HTMLElement;
|
||||||
|
try {
|
||||||
|
main = (await waitForElm("#main", true, 100, 60)) as HTMLElement;
|
||||||
|
} catch {
|
||||||
|
console.warn(
|
||||||
|
"[BetterSEQTA+] Analytics: timed out waiting for #main (shell not ready).",
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
main.innerHTML = "";
|
main.innerHTML = "";
|
||||||
main.style.overflow = "auto";
|
main.style.overflow = "auto";
|
||||||
|
|||||||
Reference in New Issue
Block a user