From 26ef306bab5b47eb41ea48de2c6d1376e57fa75a Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Tue, 28 Nov 2023 20:22:39 +0700 Subject: [PATCH] Fix Remote Play not working for free users (#171) --- better-xcloud.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 87a1b67..2d2f5ea 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -2084,7 +2084,7 @@ class RemotePlay { serverId: con.serverId, }; - const url = window.location.href.substring(0, 31) + '/launch/starfield/9NCJSXWZTP88#remote-play'; + const url = window.location.href.substring(0, 31) + '/launch/fortnite/BT5P2X999VH2#remote-play'; const $pageContent = document.getElementById('PageContent'); const $anchor = CE('a', {href: url, class: 'bx-hidden', style: 'position:absolute;top:-9990px;left:-9999px'}, ''); @@ -5373,9 +5373,6 @@ function interceptHttpRequests() { try { const clone = request.clone(); - const resp = (await (await orgFetch(...arg)).json()); - RemotePlay.XCLOUD_TOKEN = resp.gsToken; - const obj = await clone.json(); obj.offeringId = 'xhome'; @@ -5456,6 +5453,9 @@ function interceptHttpRequests() { return promise.then(response => { return response.clone().json().then(obj => { + // Store xCloud token + RemotePlay.XCLOUD_TOKEN = obj.gsToken; + // Get server list if (!Object.keys(SERVER_REGIONS).length) { for (let region of obj.offeringSettings.regions) {