mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-03 06:07:19 +02:00
Fix "enableTvRoutes" patch
This commit is contained in:
parent
4c8a49a43a
commit
3d2abf6b12
4
dist/better-xcloud.pretty.user.js
vendored
4
dist/better-xcloud.pretty.user.js
vendored
@ -5471,7 +5471,7 @@ true` + text;
|
|||||||
let match = /render:.*?jsx\)\(([^,]+),/.exec(str.substring(index, index + 100));
|
let match = /render:.*?jsx\)\(([^,]+),/.exec(str.substring(index, index + 100));
|
||||||
if (!match) return !1;
|
if (!match) return !1;
|
||||||
let funcName = match[1];
|
let funcName = match[1];
|
||||||
if (index = str.indexOf(`const ${funcName}=e=>{`), index > -1 && (index = str.indexOf("return ", index)), index > -1 && (index = str.indexOf("?", index)), index < 0) return !1;
|
if (index = str.indexOf(`const ${funcName}=({children`), index > -1 && (index = PatcherUtils.indexOf(str, "return ", 300)), index > -1 && (index = PatcherUtils.indexOf(str, "?", 100)), index < 0) return !1;
|
||||||
return str = str.substring(0, index) + "|| true" + str.substring(index), str;
|
return str = str.substring(0, index) + "|| true" + str.substring(index), str;
|
||||||
},
|
},
|
||||||
ignoreNewsSection(str) {
|
ignoreNewsSection(str) {
|
||||||
@ -5659,7 +5659,7 @@ ${subsVar} = subs;
|
|||||||
injectErrorPageUseEffect(str) {
|
injectErrorPageUseEffect(str) {
|
||||||
let index = str.indexOf('"PureErrorPage-module__container');
|
let index = str.indexOf('"PureErrorPage-module__container');
|
||||||
if (index > -1 && (index = PatcherUtils.lastIndexOf(str, "})=>(0,", index, 200)), index < 0) return !1;
|
if (index > -1 && (index = PatcherUtils.lastIndexOf(str, "})=>(0,", index, 200)), index < 0) return !1;
|
||||||
return PatcherUtils.injectUseEffect(str, index + 4, "Script", "ui.error.rendered", ",");
|
return str = PatcherUtils.insertAt(str, index + 4, "{"), str = PatcherUtils.injectUseEffect(str, index + 5, "Script", "ui.error.rendered"), str += "}", str;
|
||||||
},
|
},
|
||||||
injectStreamMenuUseEffect(str) {
|
injectStreamMenuUseEffect(str) {
|
||||||
let index = str.indexOf('"StreamMenu-module__container');
|
let index = str.indexOf('"StreamMenu-module__container');
|
||||||
|
4
dist/better-xcloud.user.js
vendored
4
dist/better-xcloud.user.js
vendored
File diff suppressed because one or more lines are too long
@ -680,9 +680,9 @@ true` + text;
|
|||||||
|
|
||||||
// Replace *qe*'s return value
|
// Replace *qe*'s return value
|
||||||
// `return a && r ?` => `return a && r || true ?`
|
// `return a && r ?` => `return a && r || true ?`
|
||||||
index = str.indexOf(`const ${funcName}=e=>{`);
|
index = str.indexOf(`const ${funcName}=({children`);
|
||||||
index > -1 && (index = str.indexOf('return ', index));
|
index > -1 && (index = PatcherUtils.indexOf(str, 'return ', 300));
|
||||||
index > -1 && (index = str.indexOf('?', index));
|
index > -1 && (index = PatcherUtils.indexOf(str, '?', 100));
|
||||||
|
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user