mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-07-06 14:21:43 +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**
|
||||
- Device: Phone, Laptop, Desktop, TV...
|
||||
- OS: Windows, Android, iOS...
|
||||
|
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -7,6 +7,8 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- ⚠️ Only use English. Any other languages will be deleted. -->
|
||||
|
||||
**I'm using:**
|
||||
- Device:
|
||||
- OS:
|
||||
|
@ -1,6 +1,9 @@
|
||||
# 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.
|
||||
|
||||
> [!NOTE]
|
||||
> The Android app is in development at [redphx/better-xcloud-android](https://github.com/redphx/better-xcloud-android)
|
||||
|
||||
**Supported platforms:**
|
||||
- Windows
|
||||
- macOS
|
||||
|
@ -1,5 +1,5 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 3.2.4
|
||||
// @version 3.2.5
|
||||
// ==/UserScript==
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 3.2.4
|
||||
// @version 3.2.5
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @license MIT
|
||||
@ -14,7 +14,7 @@
|
||||
// ==/UserScript==
|
||||
'use strict';
|
||||
|
||||
const SCRIPT_VERSION = '3.2.4';
|
||||
const SCRIPT_VERSION = '3.2.5';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
const ENABLE_XCLOUD_LOGGER = false;
|
||||
@ -558,7 +558,7 @@ const Translations = {
|
||||
"Cancel",
|
||||
"Cancelar",
|
||||
,
|
||||
,
|
||||
"Cancella",
|
||||
"キャンセル",
|
||||
"취소",
|
||||
"Anuluj",
|
||||
@ -779,7 +779,7 @@ const Translations = {
|
||||
"Controller shortcuts",
|
||||
"Habilitar atajos del Joystick",
|
||||
,
|
||||
,
|
||||
"Abilita scrociatorie da controller",
|
||||
"コントローラーショートカット",
|
||||
,
|
||||
"Skróty kontrolera",
|
||||
@ -881,7 +881,7 @@ const Translations = {
|
||||
"Delete",
|
||||
"Borrar",
|
||||
,
|
||||
,
|
||||
"Elimina",
|
||||
"削除",
|
||||
"삭제",
|
||||
"Usuń",
|
||||
@ -1051,7 +1051,7 @@ const Translations = {
|
||||
"Edit",
|
||||
"Editar",
|
||||
,
|
||||
,
|
||||
"Modifica",
|
||||
"編集",
|
||||
"편집",
|
||||
"Edytuj",
|
||||
@ -1136,7 +1136,7 @@ const Translations = {
|
||||
"Emulate controller with Mouse & Keyboard",
|
||||
"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",
|
||||
@ -1272,7 +1272,7 @@ const Translations = {
|
||||
"Fortnite: force console version",
|
||||
"Fortnite: forzar versión de consola",
|
||||
,
|
||||
,
|
||||
"Fortnite: Foza la versione console",
|
||||
"Fortnite: 強制的にコンソール版を起動する",
|
||||
,
|
||||
"Fortnite: wymuś wersję konsolową",
|
||||
@ -1394,10 +1394,10 @@ const Translations = {
|
||||
,
|
||||
"Android用のBetter xCloudをインストール",
|
||||
,
|
||||
,
|
||||
"Zainstaluj aplikację xCloud na Androida",
|
||||
"Instalar o aplicativo Better xCloud para Android",
|
||||
"Установите приложение Better xCloud для Android",
|
||||
,
|
||||
"Better xCloud'un Android uygulamasını indir",
|
||||
"Встановити додаток Better xCloud для Android",
|
||||
"Cài đặt ứng dụng Better xCloud cho Android",
|
||||
"安装Better xCloud安卓客户端",
|
||||
@ -1612,7 +1612,7 @@ const Translations = {
|
||||
"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",
|
||||
,
|
||||
,
|
||||
"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",
|
||||
@ -1629,7 +1629,7 @@ const Translations = {
|
||||
"Click to activate",
|
||||
"Haz clic para activar",
|
||||
,
|
||||
,
|
||||
"Fare clic per attivare",
|
||||
"マウスクリックで開始",
|
||||
,
|
||||
"Kliknij, aby aktywować",
|
||||
@ -1646,7 +1646,7 @@ const Translations = {
|
||||
"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",
|
||||
,
|
||||
,
|
||||
"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",
|
||||
@ -1850,7 +1850,7 @@ const Translations = {
|
||||
"Playing",
|
||||
"Jugando",
|
||||
,
|
||||
,
|
||||
"Installa l'applicazione Better xCloud per Android",
|
||||
"プレイ中",
|
||||
"플레이 중",
|
||||
"W grze",
|
||||
@ -2768,7 +2768,7 @@ const Translations = {
|
||||
"Swap buttons",
|
||||
"Intercambiar botones",
|
||||
,
|
||||
,
|
||||
"Inverti i pulsanti",
|
||||
"ボタン入れ替え",
|
||||
"버튼 바꾸기",
|
||||
"Zamień przyciski",
|
||||
@ -2989,7 +2989,7 @@ const Translations = {
|
||||
"Touch control layout",
|
||||
"Diseño de control táctil",
|
||||
,
|
||||
,
|
||||
"Controller Touch",
|
||||
"タッチコントロールレイアウト",
|
||||
,
|
||||
"Układ sterowania dotykowego",
|
||||
@ -3142,7 +3142,7 @@ const Translations = {
|
||||
"Vertical sensitivity",
|
||||
"Sensibilidad Vertical",
|
||||
,
|
||||
,
|
||||
"Sensibilità Verticale",
|
||||
"上下方向の感度",
|
||||
,
|
||||
"Czułość pionowa",
|
||||
@ -3960,7 +3960,7 @@ class LoadingScreen {
|
||||
LoadingScreen.#orgWebTitle && (document.title = LoadingScreen.#orgWebTitle);
|
||||
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"]');
|
||||
$rocketBg && $rocketBg.addEventListener('transitionend', e => {
|
||||
LoadingScreen.#$bgStyle.textContent += `
|
||||
@ -6917,13 +6917,22 @@ class UserAgent {
|
||||
}
|
||||
|
||||
static spoof() {
|
||||
let newUserAgent;
|
||||
|
||||
const profile = getPref(Preferences.USER_AGENT_PROFILE);
|
||||
if (profile === UserAgent.PROFILE_DEFAULT) {
|
||||
// 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;
|
||||
const userAgent = UserAgent.get(profile) || defaultUserAgent;
|
||||
}
|
||||
|
||||
if (!newUserAgent) {
|
||||
newUserAgent = UserAgent.get(profile) || defaultUserAgent;
|
||||
}
|
||||
|
||||
// Clear data of navigator.userAgentData, force xCloud to detect browser based on navigator.userAgent
|
||||
Object.defineProperty(window.navigator, 'userAgentData', {});
|
||||
@ -6931,10 +6940,10 @@ class UserAgent {
|
||||
// Override navigator.userAgent
|
||||
window.navigator.orgUserAgent = 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 (!hasNormalCodec && !hasHighCodec) {
|
||||
options.default = `${t('visual-quality-low')} (${t('default')})`;
|
||||
if (hasHighCodec) {
|
||||
if (!hasLowCodec && !hasNormalCodec) {
|
||||
options.default = `${t('visual-quality-high')} (${t('default')})`;
|
||||
} else {
|
||||
options.low = t('visual-quality-low');
|
||||
options.high = t('visual-quality-high');
|
||||
}
|
||||
}
|
||||
|
||||
if (hasNormalCodec) {
|
||||
if (!hasLowCodec && !hasHighCodec) {
|
||||
options.default = `${t('visual-quality-normal')} (${t('default')})`;
|
||||
@ -7169,11 +7179,12 @@ class Preferences {
|
||||
options.normal = t('visual-quality-normal');
|
||||
}
|
||||
}
|
||||
if (hasHighCodec) {
|
||||
if (!hasLowCodec && !hasNormalCodec) {
|
||||
options.default = `${t('visual-quality-high')} (${t('default')})`;
|
||||
|
||||
if (hasLowCodec) {
|
||||
if (!hasNormalCodec && !hasHighCodec) {
|
||||
options.default = `${t('visual-quality-low')} (${t('default')})`;
|
||||
} else {
|
||||
options.high = t('visual-quality-high');
|
||||
options.low = t('visual-quality-low');
|
||||
}
|
||||
}
|
||||
|
||||
@ -7216,6 +7227,7 @@ class Preferences {
|
||||
'options': {
|
||||
'default': t('default'),
|
||||
'all': t('tc-all-games'),
|
||||
'off': t('off'),
|
||||
},
|
||||
'unsupported': !HAS_TOUCH_SUPPORT,
|
||||
'ready': () => {
|
||||
@ -7393,6 +7405,7 @@ class Preferences {
|
||||
'default': '16:9',
|
||||
'options': {
|
||||
'16:9': '16:9',
|
||||
'18:9': '18:9',
|
||||
'21:9': '21:9',
|
||||
'16:10': '16:10',
|
||||
'4:3': '4:3',
|
||||
@ -8004,7 +8017,11 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const newCode = `
|
||||
let newCode = '';
|
||||
if (getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'off') {
|
||||
newCode = 'return;';
|
||||
} else {
|
||||
newCode = `
|
||||
const gamepads = window.navigator.getGamepads();
|
||||
let gamepadFound = false;
|
||||
|
||||
@ -8019,6 +8036,7 @@ if (gamepadFound) {
|
||||
return;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
funcStr = funcStr.replace(text, newCode + text);
|
||||
return funcStr;
|
||||
@ -8068,7 +8086,7 @@ if (gamepadFound) {
|
||||
|
||||
['playVibration'],
|
||||
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'],
|
||||
|
||||
@ -11470,7 +11488,7 @@ window.addEventListener(BxEvent.STREAM_LOADING, e => {
|
||||
|
||||
window.addEventListener(BxEvent.STREAM_STARTING, e => {
|
||||
// Hide loading screen
|
||||
getPref(Preferences.UI_LOADING_SCREEN_GAME_ART) && LoadingScreen.hide();
|
||||
LoadingScreen.hide();
|
||||
});
|
||||
|
||||
window.addEventListener(BxEvent.STREAM_PLAYING, e => {
|
||||
|
Reference in New Issue
Block a user