mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-07-01 11:51:43 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
886a23e5ac | |||
309feca3f9 | |||
82a9a91534 | |||
7248dac3f6 |
@ -1,5 +1,5 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 3.0.4
|
// @version 3.0.5
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 3.0.4
|
// @version 3.0.5
|
||||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||||
// @author redphx
|
// @author redphx
|
||||||
// @license MIT
|
// @license MIT
|
||||||
@ -13,7 +13,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const SCRIPT_VERSION = '3.0.4';
|
const SCRIPT_VERSION = '3.0.5';
|
||||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||||
|
|
||||||
const ENABLE_XCLOUD_LOGGER = false;
|
const ENABLE_XCLOUD_LOGGER = false;
|
||||||
@ -6808,7 +6808,7 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Enable native Mouse and Keyboard support
|
// Enable native Mouse and Keyboard support
|
||||||
if (getPref(Preferences.MKB_ENABLED)) {
|
if (ENABLE_NATIVE_MKB_BETA) {
|
||||||
newSettings.push('EnableMouseAndKeyboard: true');
|
newSettings.push('EnableMouseAndKeyboard: true');
|
||||||
newSettings.push('ShowMouseKeyboardSetting: true');
|
newSettings.push('ShowMouseKeyboardSetting: true');
|
||||||
|
|
||||||
@ -6900,17 +6900,25 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
|
|
||||||
getPref(Preferences.UI_LAYOUT) === 'tv' && ['tvLayout'],
|
getPref(Preferences.UI_LAYOUT) === 'tv' && ['tvLayout'],
|
||||||
|
|
||||||
ENABLE_XCLOUD_LOGGER && ['enableXcloudLogger'],
|
ENABLE_XCLOUD_LOGGER && [
|
||||||
|
'enableXcloudLogger',
|
||||||
|
'enableConsoleLogging',
|
||||||
|
],
|
||||||
|
|
||||||
|
getPref(Preferences.BLOCK_TRACKING) && [
|
||||||
|
'disableTrackEvent',
|
||||||
|
'blockWebRtcStatsCollector',
|
||||||
|
],
|
||||||
|
|
||||||
|
getPref(Preferences.REMOTE_PLAY_ENABLED) && [
|
||||||
|
'remotePlayDirectConnectUrl',
|
||||||
|
'remotePlayKeepAlive',
|
||||||
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'overrideSettings',
|
'overrideSettings',
|
||||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && 'remotePlayDirectConnectUrl',
|
ENABLE_NATIVE_MKB_BETA && 'mkbIsMouseAndKeyboardTitle',
|
||||||
getPref(Preferences.BLOCK_TRACKING) && 'disableTrackEvent',
|
|
||||||
HAS_TOUCH_SUPPORT && 'patchUpdateInputConfigurationAsync',
|
HAS_TOUCH_SUPPORT && 'patchUpdateInputConfigurationAsync',
|
||||||
ENABLE_NATIVE_MKB_BETA && getPref(Preferences.MKB_ENABLED) && 'mkbIsMouseAndKeyboardTitle',
|
|
||||||
ENABLE_XCLOUD_LOGGER && 'enableConsoleLogging',
|
|
||||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && 'remotePlayKeepAlive',
|
|
||||||
getPref(Preferences.BLOCK_TRACKING) && 'blockWebRtcStatsCollector',
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -6924,7 +6932,7 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
|
|
||||||
[
|
[
|
||||||
'disableGamepadDisconnectedScreen',
|
'disableGamepadDisconnectedScreen',
|
||||||
ENABLE_NATIVE_MKB_BETA && getPref(Preferences.MKB_ENABLED) && 'mkbMouseAndKeyboardEnabled',
|
ENABLE_NATIVE_MKB_BETA && 'mkbMouseAndKeyboardEnabled',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -7027,6 +7035,10 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
static #cleanupPatches() {
|
static #cleanupPatches() {
|
||||||
for (let groupIndex = Patcher.#PATCH_ORDERS.length - 1; groupIndex >= 0; groupIndex--) {
|
for (let groupIndex = Patcher.#PATCH_ORDERS.length - 1; groupIndex >= 0; groupIndex--) {
|
||||||
const group = Patcher.#PATCH_ORDERS[groupIndex];
|
const group = Patcher.#PATCH_ORDERS[groupIndex];
|
||||||
|
if (group === false) {
|
||||||
|
Patcher.#PATCH_ORDERS.splice(groupIndex, 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (let patchIndex = group.length - 1; patchIndex >= 0; patchIndex--) {
|
for (let patchIndex = group.length - 1; patchIndex >= 0; patchIndex--) {
|
||||||
const patchName = group[patchIndex];
|
const patchName = group[patchIndex];
|
||||||
@ -7830,11 +7842,11 @@ div[class*=StreamMenu-module__menuContainer] > div[class*=Menu-module] {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bx-quick-settings-tab-contents div:not([data-clarity-boost="true"]) .bx-clarity-boost-warning {
|
.bx-quick-settings-bar:not([data-clarity-boost="true"]) .bx-clarity-boost-warning {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bx-quick-settings-tab-contents div[data-clarity-boost="true"] .bx-clarity-boost-warning {
|
.bx-quick-settings-bar[data-clarity-boost="true"] .bx-clarity-boost-warning {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0px 8px;
|
margin: 0px 8px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
@ -7844,7 +7856,7 @@ div[class*=StreamMenu-module__menuContainer] > div[class*=Menu-module] {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bx-quick-settings-tab-contents div[data-clarity-boost="true"] > div[data-type="video"] {
|
.bx-quick-settings-bar[data-clarity-boost="true"] div[data-type="video"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8878,7 +8890,7 @@ function interceptHttpRequests() {
|
|||||||
overrides.inputConfiguration = overrides.inputConfiguration || {};
|
overrides.inputConfiguration = overrides.inputConfiguration || {};
|
||||||
overrides.inputConfiguration.enableVibration = true;
|
overrides.inputConfiguration.enableVibration = true;
|
||||||
if (ENABLE_NATIVE_MKB_BETA) {
|
if (ENABLE_NATIVE_MKB_BETA) {
|
||||||
overrides.inputConfiguration.enableMouseAndKeyboard = getPref(Preferences.MKB_ENABLED);
|
overrides.inputConfiguration.enableMouseAndKeyboard = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable touch controller
|
// Enable touch controller
|
||||||
@ -9384,8 +9396,10 @@ function cloneStreamHudButton($orgButton, label, svg_icon) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (HAS_TOUCH_SUPPORT) {
|
||||||
$container.addEventListener('transitionstart', onTransitionStart);
|
$container.addEventListener('transitionstart', onTransitionStart);
|
||||||
$container.addEventListener('transitionend', onTransitionEnd);
|
$container.addEventListener('transitionend', onTransitionEnd);
|
||||||
|
}
|
||||||
|
|
||||||
const $button = $container.querySelector('button');
|
const $button = $container.querySelector('button');
|
||||||
$button.setAttribute('title', label);
|
$button.setAttribute('title', label);
|
||||||
|
Reference in New Issue
Block a user