Compare commits

...

3 Commits

Author SHA1 Message Date
f3b9ebdb22 Bump version to 2.0.5 2023-12-08 07:43:30 +07:00
abd1aae57a Add "enableConsoleLogging" patch 2023-12-08 07:35:45 +07:00
ccdb944b99 Fix the Settings button not showing for some users 2023-12-08 07:23:44 +07:00
2 changed files with 21 additions and 7 deletions

View File

@ -1,5 +1,5 @@
// ==UserScript==
// @name Better xCloud
// @namespace https://github.com/redphx
// @version 2.0.4
// @version 2.0.5
// ==/UserScript==

View File

@ -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();