Merge branch 'immediate-finds' into immediate-finds-modules-proxy
This commit is contained in:
commit
2df13a2e17
|
@ -136,7 +136,7 @@ export async function loadLazyChunks() {
|
|||
const allChunks = [] as number[];
|
||||
|
||||
// Matches "id" or id:
|
||||
for (const currentMatch of String(wreq.u).matchAll(/(?:"([\de]+?)")|(?:([\de]+?):)/g)) {
|
||||
for (const currentMatch of wreq!.u.toString().matchAll(/(?:"([\deE]+?)")|(?:([\deE]+?):)/g)) {
|
||||
const id = currentMatch[1] ?? currentMatch[2];
|
||||
if (id == null) continue;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export default definePlugin({
|
|||
{
|
||||
find: ".PANEL}),nicknameIcons",
|
||||
replacement: {
|
||||
match: /USER_PROFILE_MEMBER_SINCE,.{0,100}userId:(\i\.id)}\)}\)/,
|
||||
match: /BOT_PROFILE_CREATED_ON,.{0,100}userId:(\i\.id)}\)}\)/,
|
||||
replace: "$&,$self.friendsSinceNew({userId:$1,isSidebar:true})"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -593,7 +593,7 @@ export function extractAndLoadChunksLazy(code: string | RegExp | CodeFilter, mat
|
|||
}
|
||||
|
||||
if (rawChunkIds) {
|
||||
const chunkIds = Array.from(rawChunkIds.matchAll(ChunkIdsRegex)).map(m => m[1]);
|
||||
const chunkIds = Array.from(rawChunkIds.matchAll(ChunkIdsRegex)).map(m => Number(m[1]));
|
||||
await Promise.all(chunkIds.map(id => wreq.e(id)));
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ export function extractAndLoadChunksLazy(code: string | RegExp | CodeFilter, mat
|
|||
}
|
||||
}
|
||||
|
||||
wreq(entryPointId);
|
||||
wreq(Number(entryPointId));
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue