okay CodiumAI

This commit is contained in:
Nuckyz 2024-05-22 01:27:39 -03:00
parent 1a1e5c2e1d
commit 6cc40eb095
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -507,31 +507,41 @@ async function runtime(token: string) {
try { try {
let result = null as any; let result = null as any;
if (searchType === "webpackDependantLazy" || searchType === "webpackDependantLazyComponent") { switch (searchType) {
const [factory] = args; case "webpackDependantLazy":
result = factory(); case "webpackDependantLazyComponent": {
} else if (searchType === "extractAndLoadChunks") { const [factory] = args;
const [code, matcher] = args; result = factory();
break;
const module = Vencord.Webpack.findModuleFactory(...code);
if (module) {
result = module.toString().match(Vencord.Util.canonicalizeMatch(matcher));
} }
} else { case "extractAndLoadChunks": {
const findResult = args.shift(); const [code, matcher] = args;
if (findResult != null) { const module = Vencord.Webpack.findModuleFactory(...code);
if (findResult.$$vencordCallbackCalled != null && findResult.$$vencordCallbackCalled()) { if (module) {
result = findResult; result = module.toString().match(Vencord.Util.canonicalizeMatch(matcher));
} }
if (findResult[Vencord.Util.proxyInnerGet] != null) { break;
result = findResult[Vencord.Util.proxyInnerValue]; }
default: {
const findResult = args.shift();
if (findResult != null) {
if (findResult.$$vencordCallbackCalled != null && findResult.$$vencordCallbackCalled()) {
result = findResult;
}
if (findResult[Vencord.Util.proxyInnerGet] != null) {
result = findResult[Vencord.Util.proxyInnerValue];
}
if (findResult.$$vencordInner != null) {
result = findResult.$$vencordInner();
}
} }
if (findResult.$$vencordInner != null) { break;
result = findResult.$$vencordInner();
}
} }
} }