Remove hash in handleDeepLink()

This commit is contained in:
redphx 2024-04-15 07:53:01 +07:00
parent 645155bee0
commit 08f2db0846

View File

@ -3489,6 +3489,7 @@ var APP_CONTEXT;
window.BX_EXPOSED = { window.BX_EXPOSED = {
onPollingModeChanged: mode => { onPollingModeChanged: mode => {
if (!IS_PLAYING) { if (!IS_PLAYING) {
return false; return false;
} }
@ -12181,6 +12182,9 @@ function handleDeepLink() {
return; return;
} }
// Remove hash
window.history.replaceState({origin: 'better-xcloud'}, '', window.location.href.substring(0, window.location.href.indexOf('#@')));
let path = ''; let path = '';
if (hash.startsWith('#@play')) { if (hash.startsWith('#@play')) {
path = '/launch' + hash.substring(6); path = '/launch' + hash.substring(6);
@ -12200,6 +12204,7 @@ function handleDeepLink() {
if (target.className && target.className.startsWith('AllGamesRow')) { if (target.className && target.className.startsWith('AllGamesRow')) {
localRedirect(path); localRedirect(path);
observer.disconnect(); observer.disconnect();
return;
} }
}); });