mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-19 22:20:34 +00:00
Merge f38de5cd6b
into b822542352
This commit is contained in:
commit
f556b043ec
3 changed files with 58 additions and 0 deletions
9
src/plugins/textEmoji/README.md
Normal file
9
src/plugins/textEmoji/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# TextEmoji
|
||||
|
||||
Prevents Discord from replacing emoji with images, leaving it up to the browser
|
||||
to render them
|
||||
|
||||
![Chat with TextEmoji enabled, using the Noto Color Emoji font](https://github.com/Vendicated/Vencord/assets/33988779/464ec526-8ef7-4961-941f-a2a05642b0f7)
|
||||
|
||||
Allows your browser to render emoji as regular text, using the system font, such
|
||||
as Noto Color Emoji or Segoe UI Emoji.
|
46
src/plugins/textEmoji/index.ts
Normal file
46
src/plugins/textEmoji/index.ts
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Vencord, a modification for Discord's desktop app
|
||||
* Copyright (c) 2023 Vendicated and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import "./styles.css";
|
||||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "TextEmoji",
|
||||
description: "Prevents Discord from replacing emoji with images, leaving it up to the browser to render them",
|
||||
authors: [Devs.Grzesiek11],
|
||||
patches: [
|
||||
// Reactions
|
||||
{
|
||||
find: "getSrc(){",
|
||||
replacement: {
|
||||
match: /(if\(null!=\i\))return \i\.\i\.getURL\(\i\)/,
|
||||
replace: "$1return null",
|
||||
},
|
||||
},
|
||||
// Messages
|
||||
{
|
||||
find: ",findInlineEmojisFromSurrogates:",
|
||||
replacement: {
|
||||
match: /if\(!0!==\i&&!\i\.test\(\i\)\)/,
|
||||
replace: "if(true)",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
3
src/plugins/textEmoji/styles.css
Normal file
3
src/plugins/textEmoji/styles.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
[class^="reaction_"] .emoji {
|
||||
white-space: nowrap;
|
||||
}
|
Loading…
Reference in a new issue