summaryrefslogtreecommitdiff
path: root/src/clicks.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/clicks.ts')
-rw-r--r--src/clicks.ts9
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",