Prepare for webOS & Tizen support

This commit is contained in:
redphx
2024-07-01 17:26:04 +07:00
parent 64d60aedfa
commit c1502b5552
29 changed files with 801 additions and 598 deletions

View File

@@ -623,7 +623,18 @@ true` + text;
str = str.replace(text, text + 'return;');
return str;
}
},
// Fix crashing when RequestInfo.origin is empty
patchRequestInfoCrash(str: string) {
const text = 'if(!e)throw new Error("RequestInfo.origin is falsy");';
if (!str.includes(text)) {
return false;
}
str = str.replace(text, 'if (!e) e = "https://www.xbox.com";');
return str;
},
};
let PATCH_ORDERS: PatchArray = [
@@ -634,6 +645,8 @@ let PATCH_ORDERS: PatchArray = [
'exposeInputSink',
] : []),
'patchRequestInfoCrash',
'disableStreamGate',
'overrideSettings',
'broadcastPollingMode',