From 94bbe63a421d507d0c37f09dc5173b192a79aff7 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Tue, 28 Jul 2026 09:15:36 -0400 Subject: [PATCH 1/6] Settings: fix "Above/Below Activity Settings" locations (#4458) --- src/plugins/_core/settings.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 31433e1bf..3cf75676e 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -242,8 +242,8 @@ export default definePlugin({ top: "user_section", aboveNitro: "billing_section", belowNitro: "billing_section", - aboveActivity: "activity_section", - belowActivity: "activity_section", + aboveActivity: "games_and_apps_section", + belowActivity: "games_and_apps_section", bottom: "utility_section" }; From faafedb7dcfd4a431b883c6bd472a8f9e3163680 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:00:33 -0300 Subject: [PATCH 2/6] TenorGifSearch: Fix gif selecting --- src/plugins/tenorGifSearch/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/tenorGifSearch/index.tsx b/src/plugins/tenorGifSearch/index.tsx index c825101b3..ab9befbde 100644 --- a/src/plugins/tenorGifSearch/index.tsx +++ b/src/plugins/tenorGifSearch/index.tsx @@ -159,8 +159,8 @@ export default definePlugin({ replace: "return $self.handleTrendingGifsFetch();$&" }, { - match: /\i\.\i\.post\(\{url:\i\.\i\.GIFS_SELECT,body:\{id:(\i),q:(\i),provider:\i\}/, - replace: "return $self.handleGifSelect($1,$2);$&" + match: /\i\.\i\.post\(\{url:\i\.\i\.GIFS_SELECT,body:\{id:(\i),q:(\i)\}/, + replace: "$self.handleGifSelect($1,$2)&&false&&$&" } ] }, @@ -193,7 +193,7 @@ export default definePlugin({ }, handleSearchFetch(query: string) { - // discord has a 100 result limit for normal search + // Discord has a 100 result limit for normal search fetchTenorResults("/search", 100, { q: query }) .then(results => { const items = mapToDiscordGifs(results); From 0001bab89e23bf9473e8f8dcf116575f8474360e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 29 Jul 2026 12:35:31 -0300 Subject: [PATCH 3/6] delete FavGifSearch ~ now a default Discord feature --- src/plugins/favGifSearch/README.md | 5 - src/plugins/favGifSearch/index.tsx | 245 ----------------------------- 2 files changed, 250 deletions(-) delete mode 100644 src/plugins/favGifSearch/README.md delete mode 100644 src/plugins/favGifSearch/index.tsx diff --git a/src/plugins/favGifSearch/README.md b/src/plugins/favGifSearch/README.md deleted file mode 100644 index af120dace..000000000 --- a/src/plugins/favGifSearch/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# FavoriteGifSearch - -Adds a search bar to favorite gifs. - -![Screenshot](https://github.com/Vendicated/Vencord/assets/45497981/19552adc-d921-4153-976e-e9361dc8fdaf) diff --git a/src/plugins/favGifSearch/index.tsx b/src/plugins/favGifSearch/index.tsx deleted file mode 100644 index efb96fad8..000000000 --- a/src/plugins/favGifSearch/index.tsx +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2023 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { definePluginSettings } from "@api/Settings"; -import ErrorBoundary from "@components/ErrorBoundary"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { useCallback, useEffect, useRef, useState } from "@webpack/common"; - -interface SearchBarComponentProps { - ref?: React.RefObject; - autoFocus: boolean; - size: string; - onChange: (query: string) => void; - onClear: () => void; - query: string; - placeholder: string; - className?: string; -} - -type TSearchBarComponent = - React.FC; - -interface Gif { - format: number; - src: string; - width: number; - height: number; - order: number; - url: string; -} - -interface Instance { - dead?: boolean; - state: { - resultType?: string; - }; - props: { - favCopy: Gif[], - - favorites: Gif[], - }, - forceUpdate: () => void; -} - -export const settings = definePluginSettings({ - searchOption: { - type: OptionType.SELECT, - description: "The part of the url you want to search", - options: [ - { - label: "Entire Url", - value: "url" - }, - { - label: "Path Only (/somegif.gif)", - value: "path" - }, - { - label: "Host & Path (tenor.com somgif.gif)", - value: "hostandpath", - default: true - } - ] as const - } -}); - -export default definePlugin({ - name: "FavoriteGifSearch", - authors: [Devs.Aria], - description: "Adds a search bar to favorite gifs.", - tags: ["Media", "Customisation"], - - patches: [ - { - find: "renderHeaderContent()", - replacement: [ - { - // https://regex101.com/r/07gpzP/1 - // ($1 renderHeaderContent=function { ... switch (x) ... case FAVORITES:return) ($2) ($3 case default: ... return r.jsx(($), {...props})) - match: /(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:.{0,50}?return\(0,\i\.jsx\)\((?\i\.\i),)/, - replace: "$1 this?.state?.resultType === 'Favorites' ? $self.renderSearchBar(this, $) : $2;$3" - }, - { - // to persist filtered favorites when component re-renders. - // when resizing the window the component rerenders and we loose the filtered favorites and have to type in the search bar to get them again - match: /(,suggestions:\i,favorites:)(\i),/, - replace: "$1$self.getFav($2),favCopy:$2," - } - - ] - } - ], - - settings, - - getTargetString, - - instance: null as Instance | null, - renderSearchBar(instance: Instance, SearchBarComponent: TSearchBarComponent) { - this.instance = instance; - return ( - - - - ); - }, - - getFav(favorites: Gif[]) { - if (!this.instance || this.instance.dead) return favorites; - const { favorites: filteredFavorites } = this.instance.props; - - return filteredFavorites != null && filteredFavorites?.length !== favorites.length ? filteredFavorites : favorites; - - } -}); - - -function SearchBar({ instance, SearchBarComponent }: { instance: Instance; SearchBarComponent: TSearchBarComponent; }) { - const [query, setQuery] = useState(""); - const ref = useRef(null); - - const onChange = useCallback((searchQuery: string) => { - setQuery(searchQuery); - const { props } = instance; - - // return early - if (searchQuery === "") { - props.favorites = props.favCopy; - instance.forceUpdate(); - return; - } - - - // scroll back to top - ref.current - ?.closest("#gif-picker-tab-panel") - ?.querySelector('[class*="scrollerBase"]') - ?.scrollTo(0, 0); - - - const result = - props.favCopy - .map(gif => ({ - score: fuzzySearch(searchQuery.toLowerCase(), getTargetString(gif.url ?? gif.src).replace(/(%20|[_-])/g, " ").toLowerCase()), - gif, - })) - .filter(m => m.score != null) as { score: number; gif: Gif; }[]; - - result.sort((a, b) => b.score - a.score); - props.favorites = result.map(e => e.gif); - - instance.forceUpdate(); - }, [instance.state]); - - useEffect(() => { - return () => { - instance.dead = true; - }; - }, []); - - return ( - { - setQuery(""); - if (instance.props.favCopy != null) { - instance.props.favorites = instance.props.favCopy; - instance.forceUpdate(); - } - }} - query={query} - placeholder="Search Favorite Gifs" - /> - ); -} - - - -export function getTargetString(urlStr: string) { - let url: URL; - try { - url = new URL(urlStr); - } catch (err) { - // Can't resolve URL, return as-is - return urlStr; - } - - switch (settings.store.searchOption) { - case "url": - return url.href; - case "path": - if (url.host === "media.discordapp.net" || url.host === "tenor.com") - // /attachments/899763415290097664/1095711736461537381/attachment-1.gif -> attachment-1.gif - // /view/some-gif-hi-24248063 -> some-gif-hi-24248063 - return url.pathname.split("/").at(-1) ?? url.pathname; - return url.pathname; - case "hostandpath": - if (url.host === "media.discordapp.net" || url.host === "tenor.com") - return `${url.host} ${url.pathname.split("/").at(-1) ?? url.pathname}`; - return `${url.host} ${url.pathname}`; - - default: - return ""; - } -} - -function fuzzySearch(searchQuery: string, searchString: string) { - let searchIndex = 0; - let score = 0; - - for (let i = 0; i < searchString.length; i++) { - if (searchString[i] === searchQuery[searchIndex]) { - score++; - searchIndex++; - } else { - score--; - } - - if (searchIndex === searchQuery.length) { - return score; - } - } - - return null; -} From a3250ea50e376c19b63fdd0103d75bb540e7c220 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 29 Jul 2026 12:47:05 -0300 Subject: [PATCH 4/6] OnePingPerDM: Fix plugin not working --- src/plugins/onePingPerDM/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/onePingPerDM/index.ts b/src/plugins/onePingPerDM/index.ts index 4faed9c89..a7d35c0cb 100644 --- a/src/plugins/onePingPerDM/index.ts +++ b/src/plugins/onePingPerDM/index.ts @@ -41,7 +41,7 @@ export default definePlugin({ settings, patches: [ { - find: ".getDesktopType()===", + find: '"NotificationStore"', replacement: [ { match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/, From 9054059be584fff9bc1a2537b548d23e04c26c0a Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 29 Jul 2026 16:31:16 -0300 Subject: [PATCH 5/6] ViewIcons: Fix viewing user banners --- src/plugins/viewIcons/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index 0e0a87195..58688e919 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -230,10 +230,10 @@ export default definePlugin({ }, // Banners { - find: 'backgroundColor:"COMPLETE"', + find: '"--custom-cutout-radius":', replacement: { - match: /(overflow:"visible",.{0,125}?!1\),)style:{(?=.+?backgroundImage:null!=(\i)\?`url\(\$\{\2\}\))/, - replace: (_, rest, bannerSrc) => `${rest}onClick:vcEvent=>${bannerSrc}!=null&&$self.openBanner(${bannerSrc}, vcEvent),style:{cursor:${bannerSrc}!=null?"pointer":void 0,` + match: /style:{(?=\.\.\.\i,backgroundImage:null!=(\i).{0,20}?\?`url\(\$\{\1\}\)`)/, + replace: (_, bannerSrc) => `onClick:vcEvent=>${bannerSrc}!=null&&$self.openBanner(${bannerSrc},vcEvent),style:{cursor:${bannerSrc}!=null?"pointer":void 0,` } }, // Group DMs top small & large icon From c84389de5a964f15fa37628b393c4d1a9ca80810 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:27:15 -0300 Subject: [PATCH 6/6] BetterSessions: Fix platform icon --- src/plugins/betterSessions/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/betterSessions/index.tsx b/src/plugins/betterSessions/index.tsx index db7efdf4c..5fba7d8b8 100644 --- a/src/plugins/betterSessions/index.tsx +++ b/src/plugins/betterSessions/index.tsx @@ -62,7 +62,7 @@ export default definePlugin({ find: "#{intl::AUTH_SESSIONS_OS_UNKNOWN}", replacement: [ { - match: /(#{intl::AUTH_SESSIONS_ACTIVE_RECENTLY}.{0,230}role:"listitem",children:\[.{0,15},\{Icon:)\i/, + match: /(#{intl::AUTH_SESSIONS_ACTIVE_RECENTLY}.{0,230}role:"listitem",children:\[.{0,15},\{icon:)\i/, replace: "$1()=>$self.renderIcon(arguments[0])" }, {