diff --git a/src/debug/loadLazyChunks.ts b/src/debug/loadLazyChunks.ts index 5cd8f9874..c88888bcf 100644 --- a/src/debug/loadLazyChunks.ts +++ b/src/debug/loadLazyChunks.ts @@ -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; diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index 2dcf7e9f1..1010140d4 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -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})" } }, diff --git a/src/webpack/api.tsx b/src/webpack/api.tsx index 5dc0df2a8..67a8bae34 100644 --- a/src/webpack/api.tsx +++ b/src/webpack/api.tsx @@ -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; });