mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +02:00
Fix error while loading profile page
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user