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==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 2.0.4
|
// @version 2.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 2.0.4
|
// @version 2.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 = '2.0.4';
|
const SCRIPT_VERSION = '2.0.5';
|
||||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||||
|
|
||||||
const ENABLE_MKB = false;
|
const ENABLE_MKB = false;
|
||||||
@ -4354,12 +4354,22 @@ class Patcher {
|
|||||||
},
|
},
|
||||||
|
|
||||||
enableXcloudLogger: ENABLE_XCLOUD_LOGGER && function(funcStr) {
|
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)) {
|
if (!funcStr.includes(text)) {
|
||||||
return false;
|
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;
|
return funcStr;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -4386,16 +4396,20 @@ class Patcher {
|
|||||||
|
|
||||||
['tvLayout'],
|
['tvLayout'],
|
||||||
|
|
||||||
|
['enableXcloudLogger'],
|
||||||
|
|
||||||
[
|
[
|
||||||
'enableMouseAndKeyboard',
|
'enableMouseAndKeyboard',
|
||||||
'enableXcloudLogger',
|
|
||||||
'remotePlayDirectConnectUrl',
|
'remotePlayDirectConnectUrl',
|
||||||
'disableTrackEvent',
|
'disableTrackEvent',
|
||||||
|
'enableConsoleLogging',
|
||||||
'remotePlayKeepAlive',
|
'remotePlayKeepAlive',
|
||||||
'blockWebRtcStatsCollector',
|
'blockWebRtcStatsCollector',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Only when playing
|
||||||
['remotePlayConnectMode'],
|
['remotePlayConnectMode'],
|
||||||
|
['enableConsoleLogging'],
|
||||||
];
|
];
|
||||||
|
|
||||||
static #patchFunctionBind() {
|
static #patchFunctionBind() {
|
||||||
@ -5764,7 +5778,7 @@ function interceptHttpRequests() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start rendering UI
|
// Start rendering UI
|
||||||
if (!document.getElementById('gamepass-root')) {
|
if (document.querySelector('div[class^=UnsupportedMarketPage]')) {
|
||||||
setTimeout(watchHeader, 2000);
|
setTimeout(watchHeader, 2000);
|
||||||
} else {
|
} else {
|
||||||
watchHeader();
|
watchHeader();
|
||||||
|
Reference in New Issue
Block a user