summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2024-12-17 20:58:08 +0100
committerJoel Klinghed <the_jk@spawned.biz>2024-12-17 20:58:08 +0100
commit3b198d300fd634326dcab2557c8afb18adeba144 (patch)
tree935fee1ef13e5698853acd559cd7ba8153c3c804 /src
parent29cd5193ea84df492df0b04f665c77183c911e2b (diff)
Add lint
Diffstat (limited to 'src')
-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",