diff --git a/package.json b/package.json index a91ed86b8..ba30c00f3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "equicord", "private": "true", - "version": "1.14.6.1", + "version": "1.14.6.2", "description": "The other cutest Discord client mod", "homepage": "https://github.com/Equicord/Equicord#readme", "bugs": { @@ -125,4 +125,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +} diff --git a/src/equicordplugins/dragify/index.tsx b/src/equicordplugins/dragify/index.tsx index a1105f878..aeb6a90b1 100644 --- a/src/equicordplugins/dragify/index.tsx +++ b/src/equicordplugins/dragify/index.tsx @@ -256,7 +256,7 @@ export default definePlugin({ { find: "[aria-owns=folder-items-", replacement: { - match: /"data-dnd-name":(\i)\.name,(?="data-drop-hovering".{0,100}formatToPlainString\()/, + match: /"data-dnd-name":(\i)\.name,(?="data-drop-hovering".{0,300}"aria-selected":\i\}\)\}\))/, replace: "$&draggable:!0,onDragStart:e=>$self.onGuildDragStart(e,$1.id)," } }, diff --git a/src/equicordplugins/moreUserTags/index.tsx b/src/equicordplugins/moreUserTags/index.tsx index c15bb5e39..a5f084b1b 100644 --- a/src/equicordplugins/moreUserTags/index.tsx +++ b/src/equicordplugins/moreUserTags/index.tsx @@ -57,6 +57,9 @@ export default definePlugin({ }, { find: '"#{intl::APP_TAG::hash}":', + // This matches the intl bundle, english is always loaded as a fallback bundle + // if the users language is not english, we need to apply to both because the load order is random + all: true, predicate: () => settings.store.noAppsAllowed, replacement: { match: /(#{intl::APP_TAG::hash}":\[").*?("\])/, diff --git a/src/equicordplugins/sidebarChat/index.tsx b/src/equicordplugins/sidebarChat/index.tsx index be444eed7..7b88e2603 100644 --- a/src/equicordplugins/sidebarChat/index.tsx +++ b/src/equicordplugins/sidebarChat/index.tsx @@ -136,8 +136,8 @@ export default definePlugin({ group: true, replacement: [ { - match: /\.CHANNEL\(\i\.id.{0,25}\)\(\)\);/, - replace: "$&const vc_SidebarChat=$self.renderSidebar();" + match: /if\(null!=.{0,50}ROLE_SUBSCRIPTIONS/, + replace: "const vc_SidebarChat=$self.renderSidebar();$&" }, { match: /return(\(0,\i\.jsxs?\)\(\i\.\i,{}\))}/, diff --git a/src/utils/patches.ts b/src/utils/patches.ts index 53cf05dbc..70f1f3b5d 100644 --- a/src/utils/patches.ts +++ b/src/utils/patches.ts @@ -22,10 +22,10 @@ import { Patch, PatchReplacement, ReplaceFn } from "./types"; export function canonicalizeMatch(match: T): T { let partialCanon = typeof match === "string" ? match : match.source; partialCanon = partialCanon.replaceAll(/#{intl::([\w$+/]*)(?:::(\w+))?}/g, (_, key, modifier) => { - const hashed = modifier === "raw" ? key : runtimeHashMessageKey(key); - if (modifier === "hash") return hashed; - const isString = typeof match === "string"; + const hashed = modifier === "raw" ? key : runtimeHashMessageKey(key); + if (modifier === "hash") return isString ? hashed : String.raw`(?:${hashed})`.replaceAll("+", "\\+"); + const hasSpecialChars = !Number.isNaN(Number(hashed[0])) || hashed.includes("+") || hashed.includes("/"); if (hasSpecialChars) {