mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-10 23:27:46 +02:00
Add patch to modify __PRELOADED_STATE__
This commit is contained in:
@@ -985,6 +985,16 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
|
||||
return str;
|
||||
},
|
||||
|
||||
modifyPreloadedState(str: string) {
|
||||
let text = '=window.__PRELOADED_STATE__;';
|
||||
if (!str.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
str = str.replace(text, '=window.BX_EXPOSED.modifyPreloadedState(window.__PRELOADED_STATE__);');
|
||||
return str;
|
||||
},
|
||||
};
|
||||
|
||||
let PATCH_ORDERS: PatchArray = [
|
||||
@@ -995,6 +1005,8 @@ let PATCH_ORDERS: PatchArray = [
|
||||
'exposeInputSink',
|
||||
] : []),
|
||||
|
||||
'modifyPreloadedState',
|
||||
|
||||
'optimizeGameSlugGenerator',
|
||||
|
||||
'detectBrowserRouterReady',
|
||||
|
Reference in New Issue
Block a user