Equicord/src/plugins/_api/headerBar.ts
prism 0c0498e531
feat(HeaderBarAPI): Add API to register header bar buttons (#530)
* feat(HeaderBarAPI): Add API to register header bar buttons

* bleh

* t

* t

* a

* t

---------

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
2025-11-27 16:47:59 -05:00

24 lines
667 B
TypeScript

/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
export default definePlugin({
name: "HeaderBarAPI",
description: "API to add buttons to the header bar.",
authors: [EquicordDevs.Prism],
patches: [
{
find: '?"BACK_FORWARD_NAVIGATION":',
replacement: {
match: /(?<=\i\.Fragment,\{children:\[.{1,500}className:\i\}\))(?=\])/,
replace: ",...Vencord.Api.HeaderBar._addButtons()"
}
}
]
});