Merge branch 'immediate-finds' into immediate-finds-modules-proxy

This commit is contained in:
Nuckyz 2024-06-21 19:52:16 -03:00
commit 0d360fb7e7
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
3 changed files with 6 additions and 6 deletions

View file

@ -16,7 +16,7 @@ import type { HTMLAttributes } from "react";
const { calendarFormat, dateFormat, isSameDay } = mapMangledModule("millisecondsInUnit:", {
calendarFormat: filters.byCode("sameElse"),
dateFormat: filters.byCode('":'),
dateFormat: filters.byCode(':").concat'),
isSameDay: filters.byCode("Math.abs(+"),
});
const MessageClasses = findByProps("separator", "latin24CompactTimeStamp");

View file

@ -51,10 +51,10 @@ export default definePlugin({
patches: [
{
find: "showTaglessAccountPanel:",
find: '"AccountConnected"',
replacement: {
// react.jsx)(AccountPanel, { ..., showTaglessAccountPanel: blah })
match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?showTaglessAccountPanel:)/,
match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,hidePrivateData:)/,
// react.jsx(WrapperComponent, { VencordOriginal: AccountPanel, ...
replace: "$self.PanelWrapper,{VencordOriginal:$1,"
}

View file

@ -475,11 +475,11 @@ export const _cacheFind = traceFunction("cacheFind", function _cacheFind(filter:
if (!mod?.loaded || mod?.exports == null) continue;
if (filter.$$vencordIsFactoryFilter && filter(wreq.m[key])) {
return { result: exports, id: key, exportKey: null, factory: wreq.m[key] as AnyModuleFactory };
return { result: mod.exports, id: key, exportKey: null, factory: wreq.m[key] as AnyModuleFactory };
}
if (filter(mod.exports)) {
return { result: exports, id: key, exportKey: null, factory: wreq.m[key] as AnyModuleFactory };
return { result: mod.exports, id: key, exportKey: null, factory: wreq.m[key] as AnyModuleFactory };
}
if (typeof mod.exports !== "object") {
@ -487,7 +487,7 @@ export const _cacheFind = traceFunction("cacheFind", function _cacheFind(filter:
}
if (mod.exports.default != null && filter(mod.exports.default)) {
return { result: exports.default, id: key, exportKey: "default ", factory: wreq.m[key] as AnyModuleFactory };
return { result: mod.exports.default, id: key, exportKey: "default ", factory: wreq.m[key] as AnyModuleFactory };
}
for (const exportKey in mod.exports) if (exportKey.length <= 3) {