mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-29 02:41:44 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
886a23e5ac | |||
309feca3f9 | |||
82a9a91534 | |||
7248dac3f6 |
@ -1,5 +1,5 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 3.0.4
|
||||
// @version 3.0.5
|
||||
// ==/UserScript==
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 3.0.4
|
||||
// @version 3.0.5
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @license MIT
|
||||
@ -13,7 +13,7 @@
|
||||
// ==/UserScript==
|
||||
'use strict';
|
||||
|
||||
const SCRIPT_VERSION = '3.0.4';
|
||||
const SCRIPT_VERSION = '3.0.5';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
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
|
||||
if (getPref(Preferences.MKB_ENABLED)) {
|
||||
if (ENABLE_NATIVE_MKB_BETA) {
|
||||
newSettings.push('EnableMouseAndKeyboard: 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'],
|
||||
|
||||
ENABLE_XCLOUD_LOGGER && ['enableXcloudLogger'],
|
||||
ENABLE_XCLOUD_LOGGER && [
|
||||
'enableXcloudLogger',
|
||||
'enableConsoleLogging',
|
||||
],
|
||||
|
||||
getPref(Preferences.BLOCK_TRACKING) && [
|
||||
'disableTrackEvent',
|
||||
'blockWebRtcStatsCollector',
|
||||
],
|
||||
|
||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && [
|
||||
'remotePlayDirectConnectUrl',
|
||||
'remotePlayKeepAlive',
|
||||
],
|
||||
|
||||
[
|
||||
'overrideSettings',
|
||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && 'remotePlayDirectConnectUrl',
|
||||
getPref(Preferences.BLOCK_TRACKING) && 'disableTrackEvent',
|
||||
ENABLE_NATIVE_MKB_BETA && 'mkbIsMouseAndKeyboardTitle',
|
||||
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',
|
||||
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() {
|
||||
for (let groupIndex = Patcher.#PATCH_ORDERS.length - 1; groupIndex >= 0; 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--) {
|
||||
const patchName = group[patchIndex];
|
||||
@ -7830,11 +7842,11 @@ div[class*=StreamMenu-module__menuContainer] > div[class*=Menu-module] {
|
||||
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;
|
||||
}
|
||||
|
||||
.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;
|
||||
margin: 0px 8px;
|
||||
padding: 12px;
|
||||
@ -7844,7 +7856,7 @@ div[class*=StreamMenu-module__menuContainer] > div[class*=Menu-module] {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -8878,7 +8890,7 @@ function interceptHttpRequests() {
|
||||
overrides.inputConfiguration = overrides.inputConfiguration || {};
|
||||
overrides.inputConfiguration.enableVibration = true;
|
||||
if (ENABLE_NATIVE_MKB_BETA) {
|
||||
overrides.inputConfiguration.enableMouseAndKeyboard = getPref(Preferences.MKB_ENABLED);
|
||||
overrides.inputConfiguration.enableMouseAndKeyboard = true;
|
||||
}
|
||||
|
||||
// Enable touch controller
|
||||
@ -9384,8 +9396,10 @@ function cloneStreamHudButton($orgButton, label, svg_icon) {
|
||||
}
|
||||
};
|
||||
|
||||
$container.addEventListener('transitionstart', onTransitionStart);
|
||||
$container.addEventListener('transitionend', onTransitionEnd);
|
||||
if (HAS_TOUCH_SUPPORT) {
|
||||
$container.addEventListener('transitionstart', onTransitionStart);
|
||||
$container.addEventListener('transitionend', onTransitionEnd);
|
||||
}
|
||||
|
||||
const $button = $container.querySelector('button');
|
||||
$button.setAttribute('title', label);
|
||||
|
Reference in New Issue
Block a user