Equicord/src/equicordplugins/_api/headerBar.ts

32 lines
946 B
TypeScript
Raw Normal View History

/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
2026-02-04 14:16:50 -05:00
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
export default definePlugin({
name: "HeaderBarAPI",
description: "API to add buttons to the header bar and channel toolbar.",
2026-02-04 14:16:50 -05:00
authors: [Devs.prism],
patches: [
{
find: '?"BACK_FORWARD_NAVIGATION":',
replacement: {
2026-02-27 18:52:43 -05:00
match: /(?<="HELP"===.{0,150}className:\i\.\i\}\))(?=\])/,
replace: ",...Vencord.Api.HeaderBar._addHeaderBarButtons()"
}
},
{
find: "Missing channel in Channel.renderHeaderToolbar",
replacement: {
2026-02-04 16:30:41 -05:00
match: /(?<=renderHeaderToolbar"\);let (\i)=\[\];)/,
replace: "Vencord.Api.HeaderBar._addChannelToolbarButtons($1);"
}
}
]
});