From dc55b8577219330a1f6c69ec9968b0166bb92785 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Tue, 28 Nov 2023 07:44:56 +0700 Subject: [PATCH] Fix Remote Play connecting to the wrong console (#170) --- better-xcloud.user.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 79b7a45..87a1b67 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -2079,13 +2079,12 @@ class RemotePlay { $connectButton = CE('button', {'class': 'bx-primary-button bx-no-margin'}, __('console-connect')), ); - REMOTE_PLAY_CONFIG = { - serverId: con.serverId, - }; - $connectButton.addEventListener('click', e => { + REMOTE_PLAY_CONFIG = { + serverId: con.serverId, + }; + const url = window.location.href.substring(0, 31) + '/launch/starfield/9NCJSXWZTP88#remote-play'; - // const url = '/play'; const $pageContent = document.getElementById('PageContent'); const $anchor = CE('a', {href: url, class: 'bx-hidden', style: 'position:absolute;top:-9990px;left:-9999px'}, '');