diff options
-rw-r--r-- | src/plugins/betterGifAltText.ts | 2 | ||||
-rw-r--r-- | src/plugins/fakeNitro.ts | 2 | ||||
-rw-r--r-- | src/plugins/noScreensharePreview.ts | 6 | ||||
-rw-r--r-- | src/plugins/pronoundb/index.ts | 3 | ||||
-rw-r--r-- | src/plugins/webContextMenus.web.ts | 6 | ||||
-rw-r--r-- | src/webpack/common/utils.ts | 2 |
6 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/betterGifAltText.ts b/src/plugins/betterGifAltText.ts index dcffc02..4dd30f2 100644 --- a/src/plugins/betterGifAltText.ts +++ b/src/plugins/betterGifAltText.ts @@ -34,7 +34,7 @@ export default definePlugin({ }, }, { - find: 'preload:"none","aria', + find: ".embedGallerySide", replacement: { match: /(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/, replace: diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index cd2dda8..d74a6c0 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -313,7 +313,7 @@ export default definePlugin({ find: ".Messages.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION", predicate: () => settings.store.transformEmojis, replacement: { - match: /((\i)=\i\.node,\i=\i\.emojiSourceDiscoverableGuild)(.+?return )(.{0,450}Messages\.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION.+?}\))/, + match: /((\i)=\i\.node,\i=\i\.expressionSourceGuild)(.+?return )(.{0,450}Messages\.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION.+?}\))/, replace: (_, rest1, node, rest2, reactNode) => `${rest1},fakeNitroNode=${node}${rest2}$self.addFakeNotice("EMOJI",${reactNode},fakeNitroNode.fake)` } } diff --git a/src/plugins/noScreensharePreview.ts b/src/plugins/noScreensharePreview.ts index 50b2a96..df3daad 100644 --- a/src/plugins/noScreensharePreview.ts +++ b/src/plugins/noScreensharePreview.ts @@ -27,10 +27,10 @@ export default definePlugin({ { find: '("ApplicationStreamPreviewUploadManager")', replacement: [ - "\\i\\.default\\.makeChunkedRequest\\(", - "\\i\\.\\i\\.post\\({url:" + String.raw`\i\.\i\.makeChunkedRequest\(`, + String.raw`\i\.\i\.post\({url:` ].map(match => ({ - match: new RegExp(`(?=return\\[(\\d),${match}\\i\\.\\i\\.STREAM_PREVIEW.+?}\\)\\];)`), + match: new RegExp(String.raw`(?=return\[(\d),${match}\i\.\i\.STREAM_PREVIEW.+?}\)\];)`), replace: (_, code) => `return[${code},Promise.resolve({body:"",status:204})];` })) } diff --git a/src/plugins/pronoundb/index.ts b/src/plugins/pronoundb/index.ts index 8605869..52fefdc 100644 --- a/src/plugins/pronoundb/index.ts +++ b/src/plugins/pronoundb/index.ts @@ -68,7 +68,8 @@ export default definePlugin({ find: ".USER_PROFILE_ACTIVITY", replacement: [ { - match: /getGlobalName\(\i\);(?<=displayProfile.{0,200})/, + /* FIXME: old name is getGlobalName, new name is getName. Remove optional Global once stable has also migrated */ + match: /\.get(?:Global)?Name\(\i\);(?<=displayProfile.{0,200})/, replace: "$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;" }, PRONOUN_TOOLTIP_PATCH diff --git a/src/plugins/webContextMenus.web.ts b/src/plugins/webContextMenus.web.ts index 7ec6348..ca29540 100644 --- a/src/plugins/webContextMenus.web.ts +++ b/src/plugins/webContextMenus.web.ts @@ -86,7 +86,7 @@ export default definePlugin({ }, // Fix silly Discord calling the non web support copy { - match: /\w\.default\.copy/, + match: /\i\.\i\.copy/, replace: "Vencord.Webpack.Common.Clipboard.copy" } ] @@ -102,7 +102,7 @@ export default definePlugin({ replace: "if(null==" }, { - match: /return\s*?\[\i\.default\.canCopyImage\(\)/, + match: /return\s*?\[\i\.\i\.canCopyImage\(\)/, replace: "return [true" }, { @@ -158,7 +158,7 @@ export default definePlugin({ }, { // Change calls to DiscordNative.clipboard to us instead - match: /\b\i\.default\.(copy|cut|paste)/g, + match: /\b\i\.\i\.(copy|cut|paste)/g, replace: "$self.$1" } ] diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 40a45da..2c814de 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -93,7 +93,7 @@ export const UserUtils = { }; export const Clipboard = mapMangledModuleLazy('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")', { - copy: filters.byCode(".default.copy("), + copy: filters.byCode(".copy("), SUPPORTS_COPY: x => typeof x === "boolean", }); |