aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/sync.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-02-01 00:55:46 +0100
committermetamuffin <metamuffin@disroot.org>2025-02-01 00:55:46 +0100
commitfd1823e7ecf46a230fdf2db009a30931692bc320 (patch)
treec87b8a7da1718f794580fb0eed8ce5fedcc9a6dd /web/script/player/sync.ts
parent0288a7f4ebbca560312aa9b95af32232ed7153a9 (diff)
downloadjellything-fd1823e7ecf46a230fdf2db009a30931692bc320.tar
jellything-fd1823e7ecf46a230fdf2db009a30931692bc320.tar.bz2
jellything-fd1823e7ecf46a230fdf2db009a30931692bc320.tar.zst
make ts linter happy
Diffstat (limited to 'web/script/player/sync.ts')
-rw-r--r--web/script/player/sync.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/script/player/sync.ts b/web/script/player/sync.ts
index 29a7c80..eabd360 100644
--- a/web/script/player/sync.ts
+++ b/web/script/player/sync.ts
@@ -82,11 +82,11 @@ export class Playersync {
channel_name ??= Math.random().toString(16).padEnd(5, "0").substring(2).substring(0, 6)
let [localpart, remotepart, port] = channel_name.split(":")
- if (!remotepart?.length) remotepart = window.location.host
+ if (!remotepart?.length) remotepart = globalThis.location.host
if (port) remotepart += ":" + port
this.name = localpart + ":" + remotepart
- this.ws = new WebSocket(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${remotepart}/playersync/${encodeURIComponent(localpart)}`)
+ this.ws = new WebSocket(`${globalThis.location.protocol.endsWith("s:") ? "wss" : "ws"}://${remotepart}/playersync/${encodeURIComponent(localpart)}`)
this.on_destroy.push(() => this.ws.close())
this.ws.onopen = () => {