mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-30 11:21:43 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ef5a95c88 | |||
94c742cbd6 | |||
070943e3de | |||
91deba793c | |||
06a9ca9db8 | |||
b0511d0f7a | |||
aa35f21763 |
52
.github/ISSUE_TEMPLATE/01-bug-report.yml
vendored
52
.github/ISSUE_TEMPLATE/01-bug-report.yml
vendored
@ -4,6 +4,13 @@ title: "[Bug] "
|
|||||||
labels:
|
labels:
|
||||||
- bug
|
- bug
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
> [!note]
|
||||||
|
> - Use `Discussions` if you want to ask for question.
|
||||||
|
> - Non-English reports will be deleted. No exceptions.
|
||||||
|
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
id: checklist
|
id: checklist
|
||||||
attributes:
|
attributes:
|
||||||
@ -15,17 +22,37 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I will describe the problem with as much detail as possible.
|
- label: I will describe the problem with as much detail as possible.
|
||||||
required: true
|
required: true
|
||||||
- type: checkboxes
|
|
||||||
id: questions
|
- type: dropdown
|
||||||
|
id: question_01
|
||||||
attributes:
|
attributes:
|
||||||
label: Questions
|
label: xCloud officially supports your country/region
|
||||||
options:
|
options:
|
||||||
- label: xCloud officially supports my country/region.
|
- "No"
|
||||||
required: false
|
- "Yes"
|
||||||
- label: "The bug doesn't happen when I disable Better xCloud script."
|
validations:
|
||||||
required: false
|
required: true
|
||||||
- label: "The bug didn't happen in previous Better xCloud version (name which one)."
|
|
||||||
required: false
|
- type: dropdown
|
||||||
|
id: question_02
|
||||||
|
attributes:
|
||||||
|
label: "The bug doesn't happen when you disable Better xCloud script"
|
||||||
|
options:
|
||||||
|
- "No"
|
||||||
|
- "Yes"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: question_03
|
||||||
|
attributes:
|
||||||
|
label: "Previous Better xCloud versions didn't have this bug (name which one)"
|
||||||
|
options:
|
||||||
|
- "No"
|
||||||
|
- "Yes"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: device_type
|
id: device_type
|
||||||
attributes:
|
attributes:
|
||||||
@ -40,6 +67,7 @@ body:
|
|||||||
multiple: false
|
multiple: false
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: device_name
|
id: device_name
|
||||||
attributes:
|
attributes:
|
||||||
@ -48,6 +76,7 @@ body:
|
|||||||
placeholder: "e.g., Google Pixel 8"
|
placeholder: "e.g., Google Pixel 8"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: os
|
id: os
|
||||||
attributes:
|
attributes:
|
||||||
@ -56,6 +85,7 @@ body:
|
|||||||
placeholder: "e.g., Android 14"
|
placeholder: "e.g., Android 14"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: browser_version
|
id: browser_version
|
||||||
attributes:
|
attributes:
|
||||||
@ -64,6 +94,7 @@ body:
|
|||||||
placeholder: "e.g., Chrome 124.0, Android app 0.15.0"
|
placeholder: "e.g., Chrome 124.0, Android app 0.15.0"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: extension_version
|
id: extension_version
|
||||||
attributes:
|
attributes:
|
||||||
@ -72,6 +103,7 @@ body:
|
|||||||
placeholder: "e.g., 3.5.0"
|
placeholder: "e.g., 3.5.0"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: game_list
|
id: game_list
|
||||||
attributes:
|
attributes:
|
||||||
@ -80,6 +112,7 @@ body:
|
|||||||
placeholder: "e.g., Halo"
|
placeholder: "e.g., Halo"
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: reproduction
|
id: reproduction
|
||||||
attributes:
|
attributes:
|
||||||
@ -93,6 +126,7 @@ body:
|
|||||||
3. Error
|
3. Error
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: media
|
id: media
|
||||||
attributes:
|
attributes:
|
||||||
|
6
dist/better-xcloud.lite.user.js
vendored
6
dist/better-xcloud.lite.user.js
vendored
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud (Lite)
|
// @name Better xCloud (Lite)
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 6.0.6
|
// @version 6.0.7
|
||||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||||
// @author redphx
|
// @author redphx
|
||||||
// @license MIT
|
// @license MIT
|
||||||
@ -105,7 +105,7 @@ class UserAgent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var SCRIPT_VERSION = "6.0.6", SCRIPT_VARIANT = "lite", AppInterface = window.AppInterface;
|
var SCRIPT_VERSION = "6.0.7", SCRIPT_VARIANT = "lite", AppInterface = window.AppInterface;
|
||||||
UserAgent.init();
|
UserAgent.init();
|
||||||
var userAgent = window.navigator.userAgent.toLowerCase(), isTv = userAgent.includes("smart-tv") || userAgent.includes("smarttv") || /\baft.*\b/.test(userAgent), isVr = window.navigator.userAgent.includes("VR") && window.navigator.userAgent.includes("OculusBrowser"), browserHasTouchSupport = "ontouchstart" in window || navigator.maxTouchPoints > 0, userAgentHasTouchSupport = !isTv && !isVr && browserHasTouchSupport, STATES = {
|
var userAgent = window.navigator.userAgent.toLowerCase(), isTv = userAgent.includes("smart-tv") || userAgent.includes("smarttv") || /\baft.*\b/.test(userAgent), isVr = window.navigator.userAgent.includes("VR") && window.navigator.userAgent.includes("OculusBrowser"), browserHasTouchSupport = "ontouchstart" in window || navigator.maxTouchPoints > 0, userAgentHasTouchSupport = !isTv && !isVr && browserHasTouchSupport, STATES = {
|
||||||
supportedRegion: !0,
|
supportedRegion: !0,
|
||||||
@ -5712,7 +5712,7 @@ function interceptHttpRequests() {
|
|||||||
}
|
}
|
||||||
if (STATES.userAgent.capabilities.touch && url.includes("catalog.gamepass.com/sigls/")) {
|
if (STATES.userAgent.capabilities.touch && url.includes("catalog.gamepass.com/sigls/")) {
|
||||||
let response = await NATIVE_FETCH(request, init), obj = await response.clone().json();
|
let response = await NATIVE_FETCH(request, init), obj = await response.clone().json();
|
||||||
if (url.includes("ce573635-7c18-4d0c-9d68-90b932393470")) for (let i = 1;i < obj.length; i++)
|
if (url.includes("29a81209-df6f-41fd-a528-2ae6b91f719c") || url.includes("ce573635-7c18-4d0c-9d68-90b932393470")) for (let i = 1;i < obj.length; i++)
|
||||||
gamepassAllGames.push(obj[i].id);
|
gamepassAllGames.push(obj[i].id);
|
||||||
else if (!1) try {} catch (e) {}
|
else if (!1) try {} catch (e) {}
|
||||||
return response.json = () => Promise.resolve(obj), response;
|
return response.json = () => Promise.resolve(obj), response;
|
||||||
|
2
dist/better-xcloud.meta.js
vendored
2
dist/better-xcloud.meta.js
vendored
@ -1,5 +1,5 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 6.0.6
|
// @version 6.0.7
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
17
dist/better-xcloud.user.js
vendored
17
dist/better-xcloud.user.js
vendored
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 6.0.6
|
// @version 6.0.7
|
||||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||||
// @author redphx
|
// @author redphx
|
||||||
// @license MIT
|
// @license MIT
|
||||||
@ -107,7 +107,7 @@ class UserAgent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var SCRIPT_VERSION = "6.0.6", SCRIPT_VARIANT = "full", AppInterface = window.AppInterface;
|
var SCRIPT_VERSION = "6.0.7", SCRIPT_VARIANT = "full", AppInterface = window.AppInterface;
|
||||||
UserAgent.init();
|
UserAgent.init();
|
||||||
var userAgent = window.navigator.userAgent.toLowerCase(), isTv = userAgent.includes("smart-tv") || userAgent.includes("smarttv") || /\baft.*\b/.test(userAgent), isVr = window.navigator.userAgent.includes("VR") && window.navigator.userAgent.includes("OculusBrowser"), browserHasTouchSupport = "ontouchstart" in window || navigator.maxTouchPoints > 0, userAgentHasTouchSupport = !isTv && !isVr && browserHasTouchSupport, STATES = {
|
var userAgent = window.navigator.userAgent.toLowerCase(), isTv = userAgent.includes("smart-tv") || userAgent.includes("smarttv") || /\baft.*\b/.test(userAgent), isVr = window.navigator.userAgent.includes("VR") && window.navigator.userAgent.includes("OculusBrowser"), browserHasTouchSupport = "ontouchstart" in window || navigator.maxTouchPoints > 0, userAgentHasTouchSupport = !isTv && !isVr && browserHasTouchSupport, STATES = {
|
||||||
supportedRegion: !0,
|
supportedRegion: !0,
|
||||||
@ -4481,9 +4481,9 @@ BxLogger.info('patchRemotePlayMkb', ${configsVar});
|
|||||||
return str = str.replace(text, newCode), str;
|
return str = str.replace(text, newCode), str;
|
||||||
},
|
},
|
||||||
patchShowSensorControls(str) {
|
patchShowSensorControls(str) {
|
||||||
let text = "{shouldShowSensorControls:";
|
let text = ",{shouldShowSensorControls:";
|
||||||
if (!str.includes(text)) return !1;
|
if (!str.includes(text)) return !1;
|
||||||
let newCode = "{shouldShowSensorControls: (window.BX_EXPOSED && window.BX_EXPOSED.shouldShowSensorControls) ||";
|
let newCode = ",{shouldShowSensorControls: (window.BX_EXPOSED && window.BX_EXPOSED.shouldShowSensorControls) ||";
|
||||||
return str = str.replace(text, newCode), str;
|
return str = str.replace(text, newCode), str;
|
||||||
},
|
},
|
||||||
exposeStreamSession(str) {
|
exposeStreamSession(str) {
|
||||||
@ -4745,7 +4745,7 @@ ${subsVar} = subs;
|
|||||||
getPref("touchController.mode") === "all" && "exposeTouchLayoutManager",
|
getPref("touchController.mode") === "all" && "exposeTouchLayoutManager",
|
||||||
(getPref("touchController.mode") === "off" || getPref("touchController.autoOff")) && "disableTakRenderer",
|
(getPref("touchController.mode") === "off" || getPref("touchController.autoOff")) && "disableTakRenderer",
|
||||||
getPref("touchController.opacity.default") !== 100 && "patchTouchControlDefaultOpacity",
|
getPref("touchController.opacity.default") !== 100 && "patchTouchControlDefaultOpacity",
|
||||||
"patchBabylonRendererClass"
|
getPref("touchController.mode") !== "off" && (getPref("mkb.enabled") || getPref("nativeMkb.mode") === "on") && "patchBabylonRendererClass"
|
||||||
] : [],
|
] : [],
|
||||||
BX_FLAGS.EnableXcloudLogging && "enableConsoleLogging",
|
BX_FLAGS.EnableXcloudLogging && "enableConsoleLogging",
|
||||||
"patchPollGamepads",
|
"patchPollGamepads",
|
||||||
@ -7089,8 +7089,11 @@ var BxExposed = {
|
|||||||
try {
|
try {
|
||||||
let sigls = state.xcloud.sigls;
|
let sigls = state.xcloud.sigls;
|
||||||
if (STATES.userAgent.capabilities.touch) {
|
if (STATES.userAgent.capabilities.touch) {
|
||||||
let customList = TouchController.getCustomList(), allGames = sigls["ce573635-7c18-4d0c-9d68-90b932393470"].data.products;
|
let customList = TouchController.getCustomList(), siglId = "ce573635-7c18-4d0c-9d68-90b932393470";
|
||||||
|
if (siglId in sigls) {
|
||||||
|
let allGames = sigls[siglId].data.products;
|
||||||
customList = customList.filter((id) => allGames.includes(id)), sigls["9c86f07a-f3e8-45ad-82a0-a1f759597059"]?.data.products.push(...customList);
|
customList = customList.filter((id) => allGames.includes(id)), sigls["9c86f07a-f3e8-45ad-82a0-a1f759597059"]?.data.products.push(...customList);
|
||||||
|
} else BxLogger.warning(LOG_TAG3, "Sigl not found: " + siglId);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
BxLogger.error(LOG_TAG3, e);
|
BxLogger.error(LOG_TAG3, e);
|
||||||
@ -8093,7 +8096,7 @@ function interceptHttpRequests() {
|
|||||||
}
|
}
|
||||||
if (STATES.userAgent.capabilities.touch && url.includes("catalog.gamepass.com/sigls/")) {
|
if (STATES.userAgent.capabilities.touch && url.includes("catalog.gamepass.com/sigls/")) {
|
||||||
let response = await NATIVE_FETCH(request, init), obj = await response.clone().json();
|
let response = await NATIVE_FETCH(request, init), obj = await response.clone().json();
|
||||||
if (url.includes("ce573635-7c18-4d0c-9d68-90b932393470")) for (let i = 1;i < obj.length; i++)
|
if (url.includes("29a81209-df6f-41fd-a528-2ae6b91f719c") || url.includes("ce573635-7c18-4d0c-9d68-90b932393470")) for (let i = 1;i < obj.length; i++)
|
||||||
gamepassAllGames.push(obj[i].id);
|
gamepassAllGames.push(obj[i].id);
|
||||||
else if (url.includes("9c86f07a-f3e8-45ad-82a0-a1f759597059")) try {
|
else if (url.includes("9c86f07a-f3e8-45ad-82a0-a1f759597059")) try {
|
||||||
let customList = TouchController.getCustomList();
|
let customList = TouchController.getCustomList();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export enum GamePassCloudGallery {
|
export enum GamePassCloudGallery {
|
||||||
ALL = 'ce573635-7c18-4d0c-9d68-90b932393470',
|
ALL = '29a81209-df6f-41fd-a528-2ae6b91f719c',
|
||||||
|
ALL_WITH_BYGO = 'ce573635-7c18-4d0c-9d68-90b932393470',
|
||||||
MOST_POPULAR = 'e7590b22-e299-44db-ae22-25c61405454c',
|
MOST_POPULAR = 'e7590b22-e299-44db-ae22-25c61405454c',
|
||||||
NATIVE_MKB = '8fa264dd-124f-4af3-97e8-596fcdf4b486',
|
NATIVE_MKB = '8fa264dd-124f-4af3-97e8-596fcdf4b486',
|
||||||
TOUCH = '9c86f07a-f3e8-45ad-82a0-a1f759597059',
|
TOUCH = '9c86f07a-f3e8-45ad-82a0-a1f759597059',
|
||||||
|
@ -541,12 +541,12 @@ BxLogger.info('patchRemotePlayMkb', ${configsVar});
|
|||||||
},
|
},
|
||||||
|
|
||||||
patchShowSensorControls(str: string) {
|
patchShowSensorControls(str: string) {
|
||||||
let text = '{shouldShowSensorControls:';
|
let text = ',{shouldShowSensorControls:';
|
||||||
if (!str.includes(text)) {
|
if (!str.includes(text)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const newCode = `{shouldShowSensorControls: (window.BX_EXPOSED && window.BX_EXPOSED.shouldShowSensorControls) ||`;
|
const newCode = `,{shouldShowSensorControls: (window.BX_EXPOSED && window.BX_EXPOSED.shouldShowSensorControls) ||`;
|
||||||
|
|
||||||
str = str.replace(text, newCode);
|
str = str.replace(text, newCode);
|
||||||
return str;
|
return str;
|
||||||
@ -1090,7 +1090,7 @@ let STREAM_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
|||||||
getPref<TouchControllerMode>(PrefKey.TOUCH_CONTROLLER_MODE) === TouchControllerMode.ALL && 'exposeTouchLayoutManager',
|
getPref<TouchControllerMode>(PrefKey.TOUCH_CONTROLLER_MODE) === TouchControllerMode.ALL && 'exposeTouchLayoutManager',
|
||||||
(getPref<TouchControllerMode>(PrefKey.TOUCH_CONTROLLER_MODE) === TouchControllerMode.OFF || getPref(PrefKey.TOUCH_CONTROLLER_AUTO_OFF)) && 'disableTakRenderer',
|
(getPref<TouchControllerMode>(PrefKey.TOUCH_CONTROLLER_MODE) === TouchControllerMode.OFF || getPref(PrefKey.TOUCH_CONTROLLER_AUTO_OFF)) && 'disableTakRenderer',
|
||||||
getPref<TouchControllerDefaultOpacity>(PrefKey.TOUCH_CONTROLLER_DEFAULT_OPACITY) !== 100 && 'patchTouchControlDefaultOpacity',
|
getPref<TouchControllerDefaultOpacity>(PrefKey.TOUCH_CONTROLLER_DEFAULT_OPACITY) !== 100 && 'patchTouchControlDefaultOpacity',
|
||||||
'patchBabylonRendererClass',
|
(getPref<TouchControllerMode>(PrefKey.TOUCH_CONTROLLER_MODE) !== TouchControllerMode.OFF && (getPref(PrefKey.MKB_ENABLED) || getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON)) && 'patchBabylonRendererClass',
|
||||||
] : []),
|
] : []),
|
||||||
|
|
||||||
BX_FLAGS.EnableXcloudLogging && 'enableConsoleLogging',
|
BX_FLAGS.EnableXcloudLogging && 'enableConsoleLogging',
|
||||||
|
@ -54,11 +54,16 @@ export const BxExposed = {
|
|||||||
let customList = TouchController.getCustomList();
|
let customList = TouchController.getCustomList();
|
||||||
|
|
||||||
// Remove non-cloud games from the official list
|
// Remove non-cloud games from the official list
|
||||||
const allGames = sigls[GamePassCloudGallery.ALL].data.products;
|
const siglId = GamePassCloudGallery.ALL_WITH_BYGO;
|
||||||
|
if (siglId in sigls) {
|
||||||
|
const allGames = sigls[siglId].data.products;
|
||||||
customList = customList.filter(id => allGames.includes(id));
|
customList = customList.filter(id => allGames.includes(id));
|
||||||
|
|
||||||
// Add to the official touchlist
|
// Add to the official touchlist
|
||||||
sigls[GamePassCloudGallery.TOUCH]?.data.products.push(...customList);
|
sigls[GamePassCloudGallery.TOUCH]?.data.products.push(...customList);
|
||||||
|
} else {
|
||||||
|
BxLogger.warning(LOG_TAG, 'Sigl not found: ' + siglId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
BxLogger.error(LOG_TAG, e);
|
BxLogger.error(LOG_TAG, e);
|
||||||
|
@ -253,7 +253,7 @@ export function interceptHttpRequests() {
|
|||||||
const response = await NATIVE_FETCH(request, init);
|
const response = await NATIVE_FETCH(request, init);
|
||||||
const obj = await response.clone().json();
|
const obj = await response.clone().json();
|
||||||
|
|
||||||
if (url.includes(GamePassCloudGallery.ALL)) {
|
if (url.includes(GamePassCloudGallery.ALL) || url.includes(GamePassCloudGallery.ALL_WITH_BYGO)) {
|
||||||
for (let i = 1; i < obj.length; i++) {
|
for (let i = 1; i < obj.length; i++) {
|
||||||
gamepassAllGames.push(obj[i].id);
|
gamepassAllGames.push(obj[i].id);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user