new plugin: BetterGifPicker (#2108)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
f14001b531
commit
60bc823eab
2 changed files with 27 additions and 0 deletions
23
src/plugins/betterGifPicker/index.ts
Normal file
23
src/plugins/betterGifPicker/index.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Vencord, a Discord client mod
|
||||||
|
* Copyright (c) 2024 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: "BetterGifPicker",
|
||||||
|
description: "Makes the gif picker open the favourite category by default",
|
||||||
|
authors: [Devs.Samwich],
|
||||||
|
patches: [
|
||||||
|
{
|
||||||
|
find: ".GIFPickerResultTypes.SEARCH",
|
||||||
|
replacement: [{
|
||||||
|
match: "this.state={resultType:null}",
|
||||||
|
replace: 'this.state={resultType:"Favorites"}'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
|
@ -403,6 +403,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
||||||
name: "Grzesiek11",
|
name: "Grzesiek11",
|
||||||
id: 368475654662127616n,
|
id: 368475654662127616n,
|
||||||
},
|
},
|
||||||
|
Samwich: {
|
||||||
|
name: "Samwich",
|
||||||
|
id: 976176454511509554n,
|
||||||
|
},
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
// iife so #__PURE__ works correctly
|
// iife so #__PURE__ works correctly
|
||||||
|
|
Loading…
Reference in a new issue