mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-07 05:38:27 +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)) {
|
if (getPref(Preferences.BLOCK_SOCIAL_FEATURES)) {
|
||||||
BLOCKED_URLS = BLOCKED_URLS.concat([
|
BLOCKED_URLS = BLOCKED_URLS.concat([
|
||||||
'https://peoplehub.xboxlive.com/users/me',
|
'https://peoplehub.xboxlive.com/users/me/people/social',
|
||||||
// 'https://accounts.xboxlive.com/family/memberXuid',
|
'https://peoplehub.xboxlive.com/users/me/people/recommendations',
|
||||||
'https://notificationinbox.xboxlive.com',
|
'https://notificationinbox.xboxlive.com',
|
||||||
|
// 'https://accounts.xboxlive.com/family/memberXuid',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9130,6 +9131,17 @@ function interceptHttpRequests() {
|
|||||||
let request = arg[0];
|
let request = arg[0];
|
||||||
let url = (typeof request === 'string') ? request : request.url;
|
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')) {
|
if (url.endsWith('/play')) {
|
||||||
BxEvent.dispatch(window, BxEvent.STREAM_LOADING);
|
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);
|
return NATIVE_FETCH(...arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user