make telemetry global

This commit is contained in:
41666 2023-10-01 12:40:36 -04:00
parent 5f8f065636
commit f1622d49f4
3 changed files with 5 additions and 7 deletions

View file

@ -2,11 +2,7 @@ export class Telemetry {
constructor(app, selector = "#telemetry") {
this.app = app;
this.el = document.querySelector(selector);
if (!this.el) {
throw new Error(`no element found matching ${selector}`);
}
if (location.search.includes("telemetry")) {
if (this.el && location.search.includes("telemetry")) {
this.el.style.display = "block";
this.app.onAfterUpdate(() => this.onAfterUpdate());
}