From 08f2db08464a0868736954570d07bfa3759df3cd Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Mon, 15 Apr 2024 07:53:01 +0700 Subject: [PATCH] Remove hash in handleDeepLink() --- better-xcloud.user.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 0afc1da..5311932 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -3489,6 +3489,7 @@ var APP_CONTEXT; window.BX_EXPOSED = { onPollingModeChanged: mode => { + if (!IS_PLAYING) { return false; } @@ -12181,6 +12182,9 @@ function handleDeepLink() { return; } + // Remove hash + window.history.replaceState({origin: 'better-xcloud'}, '', window.location.href.substring(0, window.location.href.indexOf('#@'))); + let path = ''; if (hash.startsWith('#@play')) { path = '/launch' + hash.substring(6); @@ -12200,6 +12204,7 @@ function handleDeepLink() { if (target.className && target.className.startsWith('AllGamesRow')) { localRedirect(path); observer.disconnect(); + return; } });