Compare commits

...

14 commits

Author SHA1 Message Date
Grzesiek11
f556b043ec
Merge f38de5cd6b into b822542352 2024-09-13 21:19:42 +02:00
Grzesiek11
f38de5cd6b
Add README 2024-06-25 01:33:14 +02:00
Grzesiek11
f6764a2a39
Fix on latest client version 2024-06-24 03:13:54 +02:00
Grzesiek11
c9df5de858
Merge branch 'dev' into plugin-text-emoji 2024-06-24 03:10:46 +02:00
Grzesiek11
b44513817c
Use \i in second patch 2024-02-07 00:27:07 +01:00
Grzesiek11
54c9564894
Add comments to patches 2024-02-07 00:26:20 +01:00
Grzesiek11
86162b301a
Keep if statement after replacing 2024-02-07 00:25:25 +01:00
Grzesiek11
1df841b406
Merge branch 'dev' into plugin-text-emoji
Sync with dev.
2024-02-06 23:52:49 +01:00
Grzesiek11
b692a6dd95
Match by partial class name in emoji container selector 2023-12-24 15:43:37 +01:00
Grzesiek11
d0e1791e6b
Revert "Match by partial class name in emoji container selector"
This reverts commit 86a9a68eca.

After thinking more about it, partial matching seems like a very bad
idea.
2023-12-24 13:15:33 +01:00
Grzesiek11
86a9a68eca
Match by partial class name in emoji container selector 2023-12-22 19:34:16 +01:00
Grzesiek11
47c33696fc
Use \i instead of .{1,2} to match identifiers 2023-12-22 19:11:20 +01:00
Grzesiek11
14512a50eb
Fix reactions breaking on ZWJ
Reactions with emoji that use ZWJ can break into multiple lines, due to
the ZWJ being considered whitespace, and the container not being big
enough to fit them.

This commit fixes this by applying a white-space: nowrap declaration to
the emoji container.
2023-12-22 19:11:20 +01:00
Grzesiek11
a0e7398725
Add TextEmoji plugin
The plugin prevents Discord from replacing emoji with images, leaving it
up to the browser to render them.
2023-12-22 19:11:14 +01:00
3 changed files with 58 additions and 0 deletions

View 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.

View 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)",
},
},
],
});

View file

@ -0,0 +1,3 @@
[class^="reaction_"] .emoji {
white-space: nowrap;
}