From 7f53657a1c7b84834a6d3f3e5fcdef1bae6b68e8 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Sat, 4 Jan 2025 21:15:15 -0500 Subject: [PATCH 1/5] make plugin --- src/plugins/fixedForumTags/README.md | 7 ++++++ src/plugins/fixedForumTags/index.ts | 36 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/plugins/fixedForumTags/README.md create mode 100644 src/plugins/fixedForumTags/index.ts diff --git a/src/plugins/fixedForumTags/README.md b/src/plugins/fixedForumTags/README.md new file mode 100644 index 0000000000..ac52fdb8d4 --- /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 0000000000..129c99680a --- /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" + } + } + ] +}); From e2bd9a54b1f4c4df0d5b2ef49b4da855d4bf5b66 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Sat, 4 Jan 2025 21:21:18 -0500 Subject: [PATCH 2/5] add images to readme.md --- src/plugins/fixedForumTags/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/fixedForumTags/README.md b/src/plugins/fixedForumTags/README.md index ac52fdb8d4..9f7f86799d 100644 --- a/src/plugins/fixedForumTags/README.md +++ b/src/plugins/fixedForumTags/README.md @@ -4,4 +4,9 @@ Discord only allows you to filter by non-moderated tags in the overflow menu, th ## Before Fixed Forum Tags +![image](https://github.com/user-attachments/assets/56d48771-8ca4-4554-9c97-fe5b97a3528f) + + ## After Fixed Forum Tags + +![image](https://github.com/user-attachments/assets/c5fc3349-d998-448f-a6e2-130327128df4) From a044d9076210238b7ed8a945d3d37b76beeca080 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Sun, 5 Jan 2025 02:43:54 -0500 Subject: [PATCH 3/5] fix find --- src/plugins/fixedForumTags/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fixedForumTags/index.ts b/src/plugins/fixedForumTags/index.ts index 129c99680a..85feebfeb8 100644 --- a/src/plugins/fixedForumTags/index.ts +++ b/src/plugins/fixedForumTags/index.ts @@ -17,7 +17,7 @@ export default definePlugin({ // 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", + find: ':"REQUEST_FORUM_UNREADS"', replacement: { match: /(?=!\i.moderated)/, replace: "arguments[1]||" From 40cc566bf75a813d0d2e5f6ea42708c54d36e1d1 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Sat, 11 Jan 2025 21:53:50 -0500 Subject: [PATCH 4/5] update desc. --- src/plugins/fixedForumTags/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fixedForumTags/index.ts b/src/plugins/fixedForumTags/index.ts index 85feebfeb8..cc34a5f9db 100644 --- a/src/plugins/fixedForumTags/index.ts +++ b/src/plugins/fixedForumTags/index.ts @@ -11,7 +11,7 @@ import definePlugin from "@utils/types"; export default definePlugin({ name: "FixedForumTags", authors: [Devs.sadan], - description: "Allows you to search and filter by moderated forum tags", + description: "Allows you to search and filter by all forum tags, even those that only moderators can add", patches: [ // shows overflow forum tags only when second arg is true (orig func only takes one arg) From 5e026367bfe69f5270d6e197c1efcc93e2631e4f Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Sat, 11 Jan 2025 21:54:20 -0500 Subject: [PATCH 5/5] Update README.md --- src/plugins/fixedForumTags/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fixedForumTags/README.md b/src/plugins/fixedForumTags/README.md index 9f7f86799d..0b5ec1fdc3 100644 --- a/src/plugins/fixedForumTags/README.md +++ b/src/plugins/fixedForumTags/README.md @@ -1,6 +1,6 @@ # 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 +Discord only allows you to filter by tags that you can add in the overflow menu, this fixes that allowing you to filter by all tags ## Before Fixed Forum Tags