mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-07-06 22:31:44 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
10e8a96a18 | |||
7201efba9c | |||
e6504d246f | |||
3847c27a1d | |||
1e56e7b2a2 | |||
0d80edb7cb | |||
b11a89037a | |||
ac08f657bb | |||
469bac6693 |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -7,6 +7,8 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<!-- ⚠️ Only use English. Any other languages will be deleted. -->
|
||||||
|
|
||||||
**Platform**
|
**Platform**
|
||||||
- Device: Phone, Laptop, Desktop, TV...
|
- Device: Phone, Laptop, Desktop, TV...
|
||||||
- OS: Windows, Android, iOS...
|
- OS: Windows, Android, iOS...
|
||||||
|
8
.github/ISSUE_TEMPLATE/feature_request.md
vendored
8
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -7,10 +7,12 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<!-- ⚠️ Only use English. Any other languages will be deleted. -->
|
||||||
|
|
||||||
**I'm using:**
|
**I'm using:**
|
||||||
- Device:
|
- Device:
|
||||||
- OS:
|
- OS:
|
||||||
- Browser:
|
- Browser:
|
||||||
|
|
||||||
**I want to suggest this feature:**
|
**I want to suggest this feature:**
|
||||||
...
|
...
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
# Better xCloud
|
# Better xCloud
|
||||||
Improve Xbox Cloud Gaming (xCloud) experience on [xbox.com/play](https://www.xbox.com/play). It also allows you to use Remote Play on the xCloud website.
|
Improve Xbox Cloud Gaming (xCloud) experience on [xbox.com/play](https://www.xbox.com/play). It also allows you to use Remote Play on the xCloud website.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The Android app is in development at [redphx/better-xcloud-android](https://github.com/redphx/better-xcloud-android)
|
||||||
|
|
||||||
**Supported platforms:**
|
**Supported platforms:**
|
||||||
- Windows
|
- Windows
|
||||||
- macOS
|
- macOS
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 3.2.4
|
// @version 3.2.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.2.4
|
// @version 3.2.5
|
||||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||||
// @author redphx
|
// @author redphx
|
||||||
// @license MIT
|
// @license MIT
|
||||||
@ -14,7 +14,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const SCRIPT_VERSION = '3.2.4';
|
const SCRIPT_VERSION = '3.2.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;
|
||||||
@ -558,7 +558,7 @@ const Translations = {
|
|||||||
"Cancel",
|
"Cancel",
|
||||||
"Cancelar",
|
"Cancelar",
|
||||||
,
|
,
|
||||||
,
|
"Cancella",
|
||||||
"キャンセル",
|
"キャンセル",
|
||||||
"취소",
|
"취소",
|
||||||
"Anuluj",
|
"Anuluj",
|
||||||
@ -779,7 +779,7 @@ const Translations = {
|
|||||||
"Controller shortcuts",
|
"Controller shortcuts",
|
||||||
"Habilitar atajos del Joystick",
|
"Habilitar atajos del Joystick",
|
||||||
,
|
,
|
||||||
,
|
"Abilita scrociatorie da controller",
|
||||||
"コントローラーショートカット",
|
"コントローラーショートカット",
|
||||||
,
|
,
|
||||||
"Skróty kontrolera",
|
"Skróty kontrolera",
|
||||||
@ -881,7 +881,7 @@ const Translations = {
|
|||||||
"Delete",
|
"Delete",
|
||||||
"Borrar",
|
"Borrar",
|
||||||
,
|
,
|
||||||
,
|
"Elimina",
|
||||||
"削除",
|
"削除",
|
||||||
"삭제",
|
"삭제",
|
||||||
"Usuń",
|
"Usuń",
|
||||||
@ -1051,7 +1051,7 @@ const Translations = {
|
|||||||
"Edit",
|
"Edit",
|
||||||
"Editar",
|
"Editar",
|
||||||
,
|
,
|
||||||
,
|
"Modifica",
|
||||||
"編集",
|
"編集",
|
||||||
"편집",
|
"편집",
|
||||||
"Edytuj",
|
"Edytuj",
|
||||||
@ -1136,7 +1136,7 @@ const Translations = {
|
|||||||
"Emulate controller with Mouse & Keyboard",
|
"Emulate controller with Mouse & Keyboard",
|
||||||
"Emular mandos con teclado y ratón",
|
"Emular mandos con teclado y ratón",
|
||||||
,
|
,
|
||||||
"Abilitare il supporto di mouse e tastiera",
|
"Abilita il supporto per mouse e tastiera",
|
||||||
"マウス&キーボード操作をコントローラー化",
|
"マウス&キーボード操作をコントローラー化",
|
||||||
"마우스 & 키보드 활성화",
|
"마우스 & 키보드 활성화",
|
||||||
"Emuluj kontroler za pomocą myszy i klawiatury",
|
"Emuluj kontroler za pomocą myszy i klawiatury",
|
||||||
@ -1272,7 +1272,7 @@ const Translations = {
|
|||||||
"Fortnite: force console version",
|
"Fortnite: force console version",
|
||||||
"Fortnite: forzar versión de consola",
|
"Fortnite: forzar versión de consola",
|
||||||
,
|
,
|
||||||
,
|
"Fortnite: Foza la versione console",
|
||||||
"Fortnite: 強制的にコンソール版を起動する",
|
"Fortnite: 強制的にコンソール版を起動する",
|
||||||
,
|
,
|
||||||
"Fortnite: wymuś wersję konsolową",
|
"Fortnite: wymuś wersję konsolową",
|
||||||
@ -1394,10 +1394,10 @@ const Translations = {
|
|||||||
,
|
,
|
||||||
"Android用のBetter xCloudをインストール",
|
"Android用のBetter xCloudをインストール",
|
||||||
,
|
,
|
||||||
,
|
"Zainstaluj aplikację xCloud na Androida",
|
||||||
"Instalar o aplicativo Better xCloud para Android",
|
"Instalar o aplicativo Better xCloud para Android",
|
||||||
"Установите приложение Better xCloud для Android",
|
"Установите приложение Better xCloud для Android",
|
||||||
,
|
"Better xCloud'un Android uygulamasını indir",
|
||||||
"Встановити додаток Better xCloud для Android",
|
"Встановити додаток Better xCloud для Android",
|
||||||
"Cài đặt ứng dụng Better xCloud cho Android",
|
"Cài đặt ứng dụng Better xCloud cho Android",
|
||||||
"安装Better xCloud安卓客户端",
|
"安装Better xCloud安卓客户端",
|
||||||
@ -1612,7 +1612,7 @@ const Translations = {
|
|||||||
"You may also need to adjust the in-game sensitivity & deadzone settings",
|
"You may also need to adjust the in-game sensitivity & deadzone settings",
|
||||||
"También puede que necesites ajustar la sensibilidad del juego y la configuración de la zona muerta",
|
"También puede que necesites ajustar la sensibilidad del juego y la configuración de la zona muerta",
|
||||||
,
|
,
|
||||||
,
|
"Potrebbe anche essere necessario regolare le impostazioni della sensibilità e deadzone del gioco",
|
||||||
"ゲーム内の設定で感度とデッドゾーンの調整が必要な場合があります",
|
"ゲーム内の設定で感度とデッドゾーンの調整が必要な場合があります",
|
||||||
,
|
,
|
||||||
"Może być również konieczne dostosowanie czułości w grze i ustawienia 'martwej strefy' urządzenia",
|
"Może być również konieczne dostosowanie czułości w grze i ustawienia 'martwej strefy' urządzenia",
|
||||||
@ -1629,7 +1629,7 @@ const Translations = {
|
|||||||
"Click to activate",
|
"Click to activate",
|
||||||
"Haz clic para activar",
|
"Haz clic para activar",
|
||||||
,
|
,
|
||||||
,
|
"Fare clic per attivare",
|
||||||
"マウスクリックで開始",
|
"マウスクリックで開始",
|
||||||
,
|
,
|
||||||
"Kliknij, aby aktywować",
|
"Kliknij, aby aktywować",
|
||||||
@ -1646,7 +1646,7 @@ const Translations = {
|
|||||||
"Using this feature when playing online could be viewed as cheating",
|
"Using this feature when playing online could be viewed as cheating",
|
||||||
"Usar esta función al jugar en línea podría ser visto como trampas",
|
"Usar esta función al jugar en línea podría ser visto como trampas",
|
||||||
,
|
,
|
||||||
,
|
"L'utilizzo di questa funzione quando si gioca online potrebbe essere considerato un baro",
|
||||||
"オンラインプレイでこの機能を使用すると不正行為と判定される可能性があります",
|
"オンラインプレイでこの機能を使用すると不正行為と判定される可能性があります",
|
||||||
,
|
,
|
||||||
"Używanie tej funkcji podczas grania online może być postrzegane jako oszukiwanie",
|
"Używanie tej funkcji podczas grania online może być postrzegane jako oszukiwanie",
|
||||||
@ -1850,7 +1850,7 @@ const Translations = {
|
|||||||
"Playing",
|
"Playing",
|
||||||
"Jugando",
|
"Jugando",
|
||||||
,
|
,
|
||||||
,
|
"Installa l'applicazione Better xCloud per Android",
|
||||||
"プレイ中",
|
"プレイ中",
|
||||||
"플레이 중",
|
"플레이 중",
|
||||||
"W grze",
|
"W grze",
|
||||||
@ -2768,7 +2768,7 @@ const Translations = {
|
|||||||
"Swap buttons",
|
"Swap buttons",
|
||||||
"Intercambiar botones",
|
"Intercambiar botones",
|
||||||
,
|
,
|
||||||
,
|
"Inverti i pulsanti",
|
||||||
"ボタン入れ替え",
|
"ボタン入れ替え",
|
||||||
"버튼 바꾸기",
|
"버튼 바꾸기",
|
||||||
"Zamień przyciski",
|
"Zamień przyciski",
|
||||||
@ -2989,7 +2989,7 @@ const Translations = {
|
|||||||
"Touch control layout",
|
"Touch control layout",
|
||||||
"Diseño de control táctil",
|
"Diseño de control táctil",
|
||||||
,
|
,
|
||||||
,
|
"Controller Touch",
|
||||||
"タッチコントロールレイアウト",
|
"タッチコントロールレイアウト",
|
||||||
,
|
,
|
||||||
"Układ sterowania dotykowego",
|
"Układ sterowania dotykowego",
|
||||||
@ -3142,7 +3142,7 @@ const Translations = {
|
|||||||
"Vertical sensitivity",
|
"Vertical sensitivity",
|
||||||
"Sensibilidad Vertical",
|
"Sensibilidad Vertical",
|
||||||
,
|
,
|
||||||
,
|
"Sensibilità Verticale",
|
||||||
"上下方向の感度",
|
"上下方向の感度",
|
||||||
,
|
,
|
||||||
"Czułość pionowa",
|
"Czułość pionowa",
|
||||||
@ -3960,7 +3960,7 @@ class LoadingScreen {
|
|||||||
LoadingScreen.#orgWebTitle && (document.title = LoadingScreen.#orgWebTitle);
|
LoadingScreen.#orgWebTitle && (document.title = LoadingScreen.#orgWebTitle);
|
||||||
LoadingScreen.#$waitTimeBox && LoadingScreen.#$waitTimeBox.classList.add('bx-gone');
|
LoadingScreen.#$waitTimeBox && LoadingScreen.#$waitTimeBox.classList.add('bx-gone');
|
||||||
|
|
||||||
if (LoadingScreen.#$bgStyle) {
|
if (getPref(Preferences.UI_LOADING_SCREEN_GAME_ART) && LoadingScreen.#$bgStyle) {
|
||||||
const $rocketBg = document.querySelector('#game-stream rect[width="800"]');
|
const $rocketBg = document.querySelector('#game-stream rect[width="800"]');
|
||||||
$rocketBg && $rocketBg.addEventListener('transitionend', e => {
|
$rocketBg && $rocketBg.addEventListener('transitionend', e => {
|
||||||
LoadingScreen.#$bgStyle.textContent += `
|
LoadingScreen.#$bgStyle.textContent += `
|
||||||
@ -6917,13 +6917,22 @@ class UserAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static spoof() {
|
static spoof() {
|
||||||
|
let newUserAgent;
|
||||||
|
|
||||||
const profile = getPref(Preferences.USER_AGENT_PROFILE);
|
const profile = getPref(Preferences.USER_AGENT_PROFILE);
|
||||||
if (profile === UserAgent.PROFILE_DEFAULT) {
|
if (profile === UserAgent.PROFILE_DEFAULT) {
|
||||||
return;
|
// Fix Kiwi 124
|
||||||
|
if (window.navigator.userAgent.includes('Chrome/124.0.0.0')) {
|
||||||
|
newUserAgent = window.navigator.userAgent.replace('Chrome/124.0.0.0', 'Chrome/122.0.0.0')
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultUserAgent = window.navigator.userAgent;
|
if (!newUserAgent) {
|
||||||
const userAgent = UserAgent.get(profile) || defaultUserAgent;
|
newUserAgent = UserAgent.get(profile) || defaultUserAgent;
|
||||||
|
}
|
||||||
|
|
||||||
// Clear data of navigator.userAgentData, force xCloud to detect browser based on navigator.userAgent
|
// Clear data of navigator.userAgentData, force xCloud to detect browser based on navigator.userAgent
|
||||||
Object.defineProperty(window.navigator, 'userAgentData', {});
|
Object.defineProperty(window.navigator, 'userAgentData', {});
|
||||||
@ -6931,10 +6940,10 @@ class UserAgent {
|
|||||||
// Override navigator.userAgent
|
// Override navigator.userAgent
|
||||||
window.navigator.orgUserAgent = window.navigator.userAgent;
|
window.navigator.orgUserAgent = window.navigator.userAgent;
|
||||||
Object.defineProperty(window.navigator, 'userAgent', {
|
Object.defineProperty(window.navigator, 'userAgent', {
|
||||||
value: userAgent,
|
value: newUserAgent,
|
||||||
});
|
});
|
||||||
|
|
||||||
return userAgent;
|
return newUserAgent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7155,13 +7164,14 @@ class Preferences {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasLowCodec) {
|
if (hasHighCodec) {
|
||||||
if (!hasNormalCodec && !hasHighCodec) {
|
if (!hasLowCodec && !hasNormalCodec) {
|
||||||
options.default = `${t('visual-quality-low')} (${t('default')})`;
|
options.default = `${t('visual-quality-high')} (${t('default')})`;
|
||||||
} else {
|
} else {
|
||||||
options.low = t('visual-quality-low');
|
options.high = t('visual-quality-high');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasNormalCodec) {
|
if (hasNormalCodec) {
|
||||||
if (!hasLowCodec && !hasHighCodec) {
|
if (!hasLowCodec && !hasHighCodec) {
|
||||||
options.default = `${t('visual-quality-normal')} (${t('default')})`;
|
options.default = `${t('visual-quality-normal')} (${t('default')})`;
|
||||||
@ -7169,11 +7179,12 @@ class Preferences {
|
|||||||
options.normal = t('visual-quality-normal');
|
options.normal = t('visual-quality-normal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasHighCodec) {
|
|
||||||
if (!hasLowCodec && !hasNormalCodec) {
|
if (hasLowCodec) {
|
||||||
options.default = `${t('visual-quality-high')} (${t('default')})`;
|
if (!hasNormalCodec && !hasHighCodec) {
|
||||||
|
options.default = `${t('visual-quality-low')} (${t('default')})`;
|
||||||
} else {
|
} else {
|
||||||
options.high = t('visual-quality-high');
|
options.low = t('visual-quality-low');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7216,6 +7227,7 @@ class Preferences {
|
|||||||
'options': {
|
'options': {
|
||||||
'default': t('default'),
|
'default': t('default'),
|
||||||
'all': t('tc-all-games'),
|
'all': t('tc-all-games'),
|
||||||
|
'off': t('off'),
|
||||||
},
|
},
|
||||||
'unsupported': !HAS_TOUCH_SUPPORT,
|
'unsupported': !HAS_TOUCH_SUPPORT,
|
||||||
'ready': () => {
|
'ready': () => {
|
||||||
@ -7393,6 +7405,7 @@ class Preferences {
|
|||||||
'default': '16:9',
|
'default': '16:9',
|
||||||
'options': {
|
'options': {
|
||||||
'16:9': '16:9',
|
'16:9': '16:9',
|
||||||
|
'18:9': '18:9',
|
||||||
'21:9': '21:9',
|
'21:9': '21:9',
|
||||||
'16:10': '16:10',
|
'16:10': '16:10',
|
||||||
'4:3': '4:3',
|
'4:3': '4:3',
|
||||||
@ -8004,7 +8017,11 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const newCode = `
|
let newCode = '';
|
||||||
|
if (getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'off') {
|
||||||
|
newCode = 'return;';
|
||||||
|
} else {
|
||||||
|
newCode = `
|
||||||
const gamepads = window.navigator.getGamepads();
|
const gamepads = window.navigator.getGamepads();
|
||||||
let gamepadFound = false;
|
let gamepadFound = false;
|
||||||
|
|
||||||
@ -8019,6 +8036,7 @@ if (gamepadFound) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
funcStr = funcStr.replace(text, newCode + text);
|
funcStr = funcStr.replace(text, newCode + text);
|
||||||
return funcStr;
|
return funcStr;
|
||||||
@ -8068,7 +8086,7 @@ if (gamepadFound) {
|
|||||||
|
|
||||||
['playVibration'],
|
['playVibration'],
|
||||||
HAS_TOUCH_SUPPORT && getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'all' && ['exposeTouchLayoutManager'],
|
HAS_TOUCH_SUPPORT && getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'all' && ['exposeTouchLayoutManager'],
|
||||||
HAS_TOUCH_SUPPORT && getPref(Preferences.STREAM_TOUCH_CONTROLLER_AUTO_OFF) && ['disableTakRenderer'],
|
HAS_TOUCH_SUPPORT && (getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'off' || getPref(Preferences.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) && ['disableTakRenderer'],
|
||||||
|
|
||||||
ENABLE_XCLOUD_LOGGER && ['enableConsoleLogging'],
|
ENABLE_XCLOUD_LOGGER && ['enableConsoleLogging'],
|
||||||
|
|
||||||
@ -11470,7 +11488,7 @@ window.addEventListener(BxEvent.STREAM_LOADING, e => {
|
|||||||
|
|
||||||
window.addEventListener(BxEvent.STREAM_STARTING, e => {
|
window.addEventListener(BxEvent.STREAM_STARTING, e => {
|
||||||
// Hide loading screen
|
// Hide loading screen
|
||||||
getPref(Preferences.UI_LOADING_SCREEN_GAME_ART) && LoadingScreen.hide();
|
LoadingScreen.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener(BxEvent.STREAM_PLAYING, e => {
|
window.addEventListener(BxEvent.STREAM_PLAYING, e => {
|
||||||
|
Reference in New Issue
Block a user