Equicord/src/equicordplugins/_api/headerBar.ts
2026-03-11 15:46:37 -04:00

31 lines
931 B
TypeScript

/*
* 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: "HeaderBarAPI",
description: "API to add buttons to the header bar and channel toolbar.",
authors: [Devs.prism],
patches: [
{
find: '?"BACK_FORWARD_NAVIGATION":',
replacement: {
match: /(?<="HELP"===.{0,75}\{\}\))(?=\])/,
replace: ",...Vencord.Api.HeaderBar._addHeaderBarButtons()"
}
},
{
find: "Missing channel in Channel.renderHeaderToolbar",
replacement: {
match: /(?<=renderHeaderToolbar"\);let (\i)=\[\];)/,
replace: "Vencord.Api.HeaderBar._addChannelToolbarButtons($1);"
}
}
]
});