2025-11-27 13:47:59 -08:00
|
|
|
/*
|
|
|
|
|
* 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";
|
2025-11-27 13:47:59 -08:00
|
|
|
import definePlugin from "@utils/types";
|
|
|
|
|
|
|
|
|
|
export default definePlugin({
|
|
|
|
|
name: "HeaderBarAPI",
|
2025-12-10 14:35:29 +01:00
|
|
|
description: "API to add buttons to the header bar and channel toolbar.",
|
2026-02-04 14:16:50 -05:00
|
|
|
authors: [Devs.prism],
|
2025-11-27 13:47:59 -08:00
|
|
|
|
|
|
|
|
patches: [
|
|
|
|
|
{
|
|
|
|
|
find: '?"BACK_FORWARD_NAVIGATION":',
|
|
|
|
|
replacement: {
|
2026-02-02 20:08:59 -05:00
|
|
|
match: /(?<="HELP".{0,150}className:\i\}\))(?=\])/,
|
2025-12-10 15:35:21 +01:00
|
|
|
replace: ",...Vencord.Api.HeaderBar._addHeaderBarButtons()"
|
2025-11-27 13:47:59 -08:00
|
|
|
}
|
2025-12-10 14:35:29 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
find: "Missing channel in Channel.renderHeaderToolbar",
|
|
|
|
|
replacement: {
|
|
|
|
|
match: /(?<=renderHeaderToolbar",\(\)=>\{.{1,200}let (\i)=\[\];)/,
|
|
|
|
|
replace: "Vencord.Api.HeaderBar._addChannelToolbarButtons($1);"
|
|
|
|
|
}
|
2025-11-27 13:47:59 -08:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|