diff --git a/src/plugins/fixedForumTags/README.md b/src/plugins/fixedForumTags/README.md new file mode 100644 index 000000000..ac52fdb8d --- /dev/null +++ b/src/plugins/fixedForumTags/README.md @@ -0,0 +1,7 @@ +# Fixed Forum Tags + +Discord only allows you to filter by non-moderated tags in the overflow menu, this fixes that allowing you to filter by all tags + +## Before Fixed Forum Tags + +## After Fixed Forum Tags diff --git a/src/plugins/fixedForumTags/index.ts b/src/plugins/fixedForumTags/index.ts new file mode 100644 index 000000000..129c99680 --- /dev/null +++ b/src/plugins/fixedForumTags/index.ts @@ -0,0 +1,36 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2025 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + + +export default definePlugin({ + name: "FixedForumTags", + authors: [Devs.sadan], + description: "Allows you to search and filter by moderated forum tags", + + patches: [ + // shows overflow forum tags only when second arg is true (orig func only takes one arg) + // we need to filter with a second arg because this func is also used for adding tags when posting + { + find: "2023-01_forums_non_community", + replacement: { + match: /(?=!\i.moderated)/, + replace: "arguments[1]||" + } + }, + // patches the dropdown menu where overflow forum tags are listed, + // sets the second parameter to true to not ignore moderated forum tags + { + find: "\"-all-tags-dropdown-navigator\"", + replacement: { + match: /((\i)=\(0,\i\.\i\)\(\i)(\))(?=.*children:\2\.map\()/, + replace: "$1,true$3" + } + } + ] +});