From 6510eac0c3d73ec349a203597f86bdc72765b72d Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:23:06 +0700 Subject: [PATCH] Fix error while loading profile page --- better-xcloud.user.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 7281ff4..4615f43 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -9051,9 +9051,10 @@ function interceptHttpRequests() { if (getPref(Preferences.BLOCK_SOCIAL_FEATURES)) { BLOCKED_URLS = BLOCKED_URLS.concat([ - 'https://peoplehub.xboxlive.com/users/me', - // 'https://accounts.xboxlive.com/family/memberXuid', + 'https://peoplehub.xboxlive.com/users/me/people/social', + 'https://peoplehub.xboxlive.com/users/me/people/recommendations', 'https://notificationinbox.xboxlive.com', + // 'https://accounts.xboxlive.com/family/memberXuid', ]); } @@ -9130,6 +9131,17 @@ function interceptHttpRequests() { let request = arg[0]; let url = (typeof request === 'string') ? request : request.url; + for (let blocked of BLOCKED_URLS) { + if (!url.startsWith(blocked)) { + continue; + } + + return new Response('{"acc":1,"webResult":{}}', { + status: 200, + statusText: '200 OK', + }); + } + if (url.endsWith('/play')) { BxEvent.dispatch(window, BxEvent.STREAM_LOADING); } @@ -9457,17 +9469,6 @@ function interceptHttpRequests() { }); } - for (let blocked of BLOCKED_URLS) { - if (!url.startsWith(blocked)) { - continue; - } - - return new Response('{"acc":1,"webResult":{}}', { - status: 200, - statusText: '200 OK', - }); - } - return NATIVE_FETCH(...arg); } }