1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-25 00:36:23 +00:00

make plugin

This commit is contained in:
sadan 2025-01-04 21:15:15 -05:00
parent 7be3a40b7c
commit 7f53657a1c
No known key found for this signature in database
2 changed files with 43 additions and 0 deletions

View file

@ -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

View file

@ -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"
}
}
]
});