mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-29 10:51:44 +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:
|
||||
- bug
|
||||
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
|
||||
id: checklist
|
||||
attributes:
|
||||
@ -15,17 +22,37 @@ body:
|
||||
required: true
|
||||
- label: I will describe the problem with as much detail as possible.
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: questions
|
||||
|
||||
- type: dropdown
|
||||
id: question_01
|
||||
attributes:
|
||||
label: Questions
|
||||
label: xCloud officially supports your country/region
|
||||
options:
|
||||
- label: xCloud officially supports my country/region.
|
||||
required: false
|
||||
- label: "The bug doesn't happen when I disable Better xCloud script."
|
||||
required: false
|
||||
- label: "The bug didn't happen in previous Better xCloud version (name which one)."
|
||||
required: false
|
||||
- "No"
|
||||
- "Yes"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- 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
|
||||
id: device_type
|
||||
attributes:
|
||||
@ -40,6 +67,7 @@ body:
|
||||
multiple: false
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: device_name
|
||||
attributes:
|
||||
@ -48,6 +76,7 @@ body:
|
||||
placeholder: "e.g., Google Pixel 8"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
@ -56,6 +85,7 @@ body:
|
||||
placeholder: "e.g., Android 14"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: browser_version
|
||||
attributes:
|
||||
@ -64,6 +94,7 @@ body:
|
||||
placeholder: "e.g., Chrome 124.0, Android app 0.15.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: extension_version
|
||||
attributes:
|
||||
@ -72,6 +103,7 @@ body:
|
||||
placeholder: "e.g., 3.5.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: game_list
|
||||
attributes:
|
||||
@ -80,6 +112,7 @@ body:
|
||||
placeholder: "e.g., Halo"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
@ -93,6 +126,7 @@ body:
|
||||
3. Error
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: media
|
||||
attributes:
|
||||
|
6
dist/better-xcloud.lite.user.js
vendored
6
dist/better-xcloud.lite.user.js
vendored
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud (Lite)
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 6.0.6
|
||||
// @version 6.0.7
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @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();
|
||||
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,
|
||||
@ -5712,7 +5712,7 @@ function interceptHttpRequests() {
|
||||
}
|
||||
if (STATES.userAgent.capabilities.touch && url.includes("catalog.gamepass.com/sigls/")) {
|
||||
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);
|
||||
else if (!1) try {} catch (e) {}
|
||||
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==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 6.0.6
|
||||
// @version 6.0.7
|
||||
// ==/UserScript==
|
||||
|
19
dist/better-xcloud.user.js
vendored
19
dist/better-xcloud.user.js
vendored
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 6.0.6
|
||||
// @version 6.0.7
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @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();
|
||||
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,
|
||||
@ -4481,9 +4481,9 @@ BxLogger.info('patchRemotePlayMkb', ${configsVar});
|
||||
return str = str.replace(text, newCode), str;
|
||||
},
|
||||
patchShowSensorControls(str) {
|
||||
let text = "{shouldShowSensorControls:";
|
||||
let text = ",{shouldShowSensorControls:";
|
||||
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;
|
||||
},
|
||||
exposeStreamSession(str) {
|
||||
@ -4745,7 +4745,7 @@ ${subsVar} = subs;
|
||||
getPref("touchController.mode") === "all" && "exposeTouchLayoutManager",
|
||||
(getPref("touchController.mode") === "off" || getPref("touchController.autoOff")) && "disableTakRenderer",
|
||||
getPref("touchController.opacity.default") !== 100 && "patchTouchControlDefaultOpacity",
|
||||
"patchBabylonRendererClass"
|
||||
getPref("touchController.mode") !== "off" && (getPref("mkb.enabled") || getPref("nativeMkb.mode") === "on") && "patchBabylonRendererClass"
|
||||
] : [],
|
||||
BX_FLAGS.EnableXcloudLogging && "enableConsoleLogging",
|
||||
"patchPollGamepads",
|
||||
@ -7089,8 +7089,11 @@ var BxExposed = {
|
||||
try {
|
||||
let sigls = state.xcloud.sigls;
|
||||
if (STATES.userAgent.capabilities.touch) {
|
||||
let customList = TouchController.getCustomList(), allGames = sigls["ce573635-7c18-4d0c-9d68-90b932393470"].data.products;
|
||||
customList = customList.filter((id) => allGames.includes(id)), sigls["9c86f07a-f3e8-45ad-82a0-a1f759597059"]?.data.products.push(...customList);
|
||||
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);
|
||||
} else BxLogger.warning(LOG_TAG3, "Sigl not found: " + siglId);
|
||||
}
|
||||
} catch (e) {
|
||||
BxLogger.error(LOG_TAG3, e);
|
||||
@ -8093,7 +8096,7 @@ function interceptHttpRequests() {
|
||||
}
|
||||
if (STATES.userAgent.capabilities.touch && url.includes("catalog.gamepass.com/sigls/")) {
|
||||
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);
|
||||
else if (url.includes("9c86f07a-f3e8-45ad-82a0-a1f759597059")) try {
|
||||
let customList = TouchController.getCustomList();
|
||||
|
@ -1,5 +1,6 @@
|
||||
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',
|
||||
NATIVE_MKB = '8fa264dd-124f-4af3-97e8-596fcdf4b486',
|
||||
TOUCH = '9c86f07a-f3e8-45ad-82a0-a1f759597059',
|
||||
|
@ -541,12 +541,12 @@ BxLogger.info('patchRemotePlayMkb', ${configsVar});
|
||||
},
|
||||
|
||||
patchShowSensorControls(str: string) {
|
||||
let text = '{shouldShowSensorControls:';
|
||||
let text = ',{shouldShowSensorControls:';
|
||||
if (!str.includes(text)) {
|
||||
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);
|
||||
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.OFF || getPref(PrefKey.TOUCH_CONTROLLER_AUTO_OFF)) && 'disableTakRenderer',
|
||||
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',
|
||||
|
@ -54,11 +54,16 @@ export const BxExposed = {
|
||||
let customList = TouchController.getCustomList();
|
||||
|
||||
// Remove non-cloud games from the official list
|
||||
const allGames = sigls[GamePassCloudGallery.ALL].data.products;
|
||||
customList = customList.filter(id => allGames.includes(id));
|
||||
const siglId = GamePassCloudGallery.ALL_WITH_BYGO;
|
||||
if (siglId in sigls) {
|
||||
const allGames = sigls[siglId].data.products;
|
||||
customList = customList.filter(id => allGames.includes(id));
|
||||
|
||||
// Add to the official touchlist
|
||||
sigls[GamePassCloudGallery.TOUCH]?.data.products.push(...customList);
|
||||
// Add to the official touchlist
|
||||
sigls[GamePassCloudGallery.TOUCH]?.data.products.push(...customList);
|
||||
} else {
|
||||
BxLogger.warning(LOG_TAG, 'Sigl not found: ' + siglId);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
BxLogger.error(LOG_TAG, e);
|
||||
|
@ -253,7 +253,7 @@ export function interceptHttpRequests() {
|
||||
const response = await NATIVE_FETCH(request, init);
|
||||
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++) {
|
||||
gamepassAllGames.push(obj[i].id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user