mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-28 18:31:44 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
f3b9ebdb22 | |||
abd1aae57a | |||
ccdb944b99 |
@ -1,5 +1,5 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 2.0.4
|
||||
// @version 2.0.5
|
||||
// ==/UserScript==
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 2.0.4
|
||||
// @version 2.0.5
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @license MIT
|
||||
@ -13,7 +13,7 @@
|
||||
// ==/UserScript==
|
||||
'use strict';
|
||||
|
||||
const SCRIPT_VERSION = '2.0.4';
|
||||
const SCRIPT_VERSION = '2.0.5';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
const ENABLE_MKB = false;
|
||||
@ -4354,12 +4354,22 @@ class Patcher {
|
||||
},
|
||||
|
||||
enableXcloudLogger: ENABLE_XCLOUD_LOGGER && function(funcStr) {
|
||||
const text = 'if(t!==Ke.LogLevel.Error&&t!==Ke.LogLevel.Warn)';
|
||||
const text = '}log(e,t,n){';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
funcStr = funcStr.replaceAll(text, 'console.log(arguments);' + text);
|
||||
funcStr = funcStr.replaceAll(text, text + 'console.log(arguments);');
|
||||
return funcStr;
|
||||
},
|
||||
|
||||
enableConsoleLogging: ENABLE_XCLOUD_LOGGER && function(funcStr) {
|
||||
const text = 'static isConsoleLoggingAllowed(){';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
funcStr = funcStr.replaceAll(text, text + 'return true;');
|
||||
return funcStr;
|
||||
},
|
||||
|
||||
@ -4386,16 +4396,20 @@ class Patcher {
|
||||
|
||||
['tvLayout'],
|
||||
|
||||
['enableXcloudLogger'],
|
||||
|
||||
[
|
||||
'enableMouseAndKeyboard',
|
||||
'enableXcloudLogger',
|
||||
'remotePlayDirectConnectUrl',
|
||||
'disableTrackEvent',
|
||||
'enableConsoleLogging',
|
||||
'remotePlayKeepAlive',
|
||||
'blockWebRtcStatsCollector',
|
||||
],
|
||||
|
||||
// Only when playing
|
||||
['remotePlayConnectMode'],
|
||||
['enableConsoleLogging'],
|
||||
];
|
||||
|
||||
static #patchFunctionBind() {
|
||||
@ -5764,7 +5778,7 @@ function interceptHttpRequests() {
|
||||
}
|
||||
|
||||
// Start rendering UI
|
||||
if (!document.getElementById('gamepass-root')) {
|
||||
if (document.querySelector('div[class^=UnsupportedMarketPage]')) {
|
||||
setTimeout(watchHeader, 2000);
|
||||
} else {
|
||||
watchHeader();
|
||||
|
Reference in New Issue
Block a user