From b3c01d4c851e5927dae60161e73c8a8a70c77e3f Mon Sep 17 00:00:00 2001 From: Ryan <7389646+ryanbarlow97@users.noreply.github.com> Date: Thu, 5 Mar 2026 03:27:53 +0000 Subject: [PATCH] improve streamer mode (#3353) ## Description: improves streamer mode (doesn't show the gameID in the url, it just says "streamer-mode" ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: w.o.n --- src/client/Main.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/Main.ts b/src/client/Main.ts index b3bf14d05..1300d8789 100644 --- a/src/client/Main.ts +++ b/src/client/Main.ts @@ -832,10 +832,13 @@ class Client { if (window.location.hash === "" || window.location.hash === "#") { history.replaceState(null, "", window.location.origin + "#refresh"); } + const lobbyIdHidden = !this.userSettings.lobbyIdVisibility(); history.pushState( null, "", - `/${config.workerPath(lobby.gameID)}/game/${lobby.gameID}?live`, + lobbyIdHidden + ? "/streamer-mode" + : `/${config.workerPath(lobby.gameID)}/game/${lobby.gameID}?live`, ); // Store current URL for popstate confirmation @@ -848,7 +851,10 @@ class Client { lobbyId: string, config: Awaited>, ) { - const targetUrl = `/${config.workerPath(lobbyId)}/game/${lobbyId}`; + const lobbyIdHidden = !this.userSettings.lobbyIdVisibility(); + const targetUrl = lobbyIdHidden + ? "/streamer-mode" + : `/${config.workerPath(lobbyId)}/game/${lobbyId}`; const currentUrl = window.location.pathname; if (currentUrl !== targetUrl) {