diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2024-12-17 20:58:08 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2024-12-17 20:58:08 +0100 |
| commit | 3b198d300fd634326dcab2557c8afb18adeba144 (patch) | |
| tree | 935fee1ef13e5698853acd559cd7ba8153c3c804 /src/clicks.ts | |
| parent | 29cd5193ea84df492df0b04f665c77183c911e2b (diff) | |
Add lint
Diffstat (limited to 'src/clicks.ts')
| -rw-r--r-- | src/clicks.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clicks.ts b/src/clicks.ts index 100e5b6..9eb8bcd 100644 --- a/src/clicks.ts +++ b/src/clicks.ts @@ -11,7 +11,7 @@ class Session { const openInfo = await this.wss.opened this.writer = openInfo.writable.getWriter() for (const event of this.queue) { - this.writer.write(event) + void this.writer.write(event) } } @@ -19,21 +19,22 @@ class Session { if (this.writer === undefined) { this.queue.push(event) } else { - this.writer.write(event) + void this.writer.write(event) } } } function startSession(data: string): Session { const session = new Session() - session.connect() + void session.connect() session.reportEvent(data) return session } document.addEventListener("DOMContentLoaded", () => { + const ua = navigator.userAgentData?.brands?.map((brand) => `${brand.brand}:${brand.version}`).join(',') const session = startSession( - `${document.documentElement.clientWidth}x${document.documentElement.clientHeight}:${navigator.userAgentData?.brands}` + `${document.documentElement.clientWidth}x${document.documentElement.clientHeight}:${ua}` ) document.documentElement.addEventListener( "click", |
