mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Add "enableXcloudLogger" patch
This commit is contained in:
parent
01861e0ca5
commit
49550eed0a
@ -17,6 +17,7 @@ const SCRIPT_VERSION = '2.0.3';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
const ENABLE_MKB = false;
|
||||
const ENABLE_XCLOUD_LOGGER = false;
|
||||
|
||||
console.log(`[Better xCloud] readyState: ${document.readyState}`);
|
||||
|
||||
@ -4284,6 +4285,16 @@ class Patcher {
|
||||
return funcStr.replace(text, '.disableTelemetry=function(){return!0}');
|
||||
},
|
||||
|
||||
enableXcloudLogger: ENABLE_XCLOUD_LOGGER && function(funcStr) {
|
||||
const text = 'if(t!==Ke.LogLevel.Error&&t!==Ke.LogLevel.Warn)';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
funcStr = funcStr.replaceAll(text, 'console.log(arguments);' + text);
|
||||
return funcStr;
|
||||
},
|
||||
|
||||
// Set TV layout
|
||||
tvLayout: PREFS.get(Preferences.UI_LAYOUT) === 'tv' && function(funcStr) {
|
||||
const text = '?"tv":"default"';
|
||||
|
Loading…
x
Reference in New Issue
Block a user