From e4c38443b9adf57a874b427550ade5f8680ea8ed Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 9 Oct 2022 18:48:32 +0200 Subject: reload on hash change --- client-web/source/index.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client-web/source/index.ts') diff --git a/client-web/source/index.ts b/client-web/source/index.ts index c36ea1f..be44c57 100644 --- a/client-web/source/index.ts +++ b/client-web/source/index.ts @@ -36,6 +36,10 @@ export interface User { } window.onload = () => main() +window.onhashchange = () => { + // TODO might just destroy room object and create a new one, but cleanup probably wont work. lets reload instead + window.location.reload() +} export async function main() { log("*", "starting up") -- cgit v1.2.3-70-g09d2