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,17 +507,24 @@ async function runtime(token: string) {
try { try {
let result = null as any; let result = null as any;
if (searchType === "webpackDependantLazy" || searchType === "webpackDependantLazyComponent") { switch (searchType) {
case "webpackDependantLazy":
case "webpackDependantLazyComponent": {
const [factory] = args; const [factory] = args;
result = factory(); result = factory();
} else if (searchType === "extractAndLoadChunks") { break;
}
case "extractAndLoadChunks": {
const [code, matcher] = args; const [code, matcher] = args;
const module = Vencord.Webpack.findModuleFactory(...code); const module = Vencord.Webpack.findModuleFactory(...code);
if (module) { if (module) {
result = module.toString().match(Vencord.Util.canonicalizeMatch(matcher)); result = module.toString().match(Vencord.Util.canonicalizeMatch(matcher));
} }
} else {
break;
}
default: {
const findResult = args.shift(); const findResult = args.shift();
if (findResult != null) { if (findResult != null) {
@ -533,6 +540,9 @@ async function runtime(token: string) {
result = findResult.$$vencordInner(); result = findResult.$$vencordInner();
} }
} }
break;
}
} }
if (result == null) { if (result == null) {