mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Redirect to /en-US/play if visiting from an unsupported region
This commit is contained in:
parent
e8376b52fe
commit
17c08792e1
6
dist/better-xcloud.user.js
vendored
6
dist/better-xcloud.user.js
vendored
@ -5803,6 +5803,12 @@ var BxExposed = {
|
||||
} catch (e) {
|
||||
BxLogger.error(LOG_TAG3, e);
|
||||
}
|
||||
try {
|
||||
let xCloud = state.xcloud.authentication.authStatusByStrategy.XCloud;
|
||||
if (xCloud.type === 3 && xCloud.error.type === "UnsupportedMarketError") window.stop(), window.location.href = "https://www.xbox.com/en-US/play";
|
||||
} catch (e) {
|
||||
BxLogger.error(LOG_TAG3, e);
|
||||
}
|
||||
return state;
|
||||
},
|
||||
modifyTitleInfo: function(titleInfo) {
|
||||
|
@ -63,6 +63,18 @@ export const BxExposed = {
|
||||
BxLogger.error(LOG_TAG, e);
|
||||
}
|
||||
|
||||
// Redirect to /en-US/play if visiting from an unsupported region
|
||||
try {
|
||||
const xCloud = state.xcloud.authentication.authStatusByStrategy.XCloud;
|
||||
if (xCloud.type === 3 && xCloud.error.type === 'UnsupportedMarketError') {
|
||||
// Redirect to /en-US/play
|
||||
window.stop();
|
||||
window.location.href = 'https://www.xbox.com/en-US/play';
|
||||
}
|
||||
} catch (e) {
|
||||
BxLogger.error(LOG_TAG, e);
|
||||
}
|
||||
|
||||
return state;
|
||||
}),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user