mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-04 11:44:00 +00:00
Make sending combined emoji work
This commit is contained in:
parent
d25da5f284
commit
d1e37e1c1b
2 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,7 @@ export const SKIN_TONES = {
|
||||||
5: '1f3ff'
|
5: '1f3ff'
|
||||||
};
|
};
|
||||||
export const JOINER_REPLACEMENT = /(?<!\u{E0002})\u{E0002}/gu;
|
export const JOINER_REPLACEMENT = /(?<!\u{E0002})\u{E0002}/gu;
|
||||||
|
export const EMOJI_JOINER = '\u{E0002}';
|
||||||
|
|
||||||
export const IMAGE_PATHS = {
|
export const IMAGE_PATHS = {
|
||||||
google: 'noto',
|
google: 'noto',
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { TWITCH_POINTS_SETS, TWITCH_GLOBAL_SETS, TWITCH_PRIME_SETS, KNOWN_CODES,
|
||||||
import Twilight from 'site';
|
import Twilight from 'site';
|
||||||
import { FFZEvent } from 'src/utilities/events';
|
import { FFZEvent } from 'src/utilities/events';
|
||||||
import { getTwitchEmoteSrcSet, getTwitchEmoteURL } from 'src/utilities/object';
|
import { getTwitchEmoteSrcSet, getTwitchEmoteURL } from 'src/utilities/object';
|
||||||
|
import {EMOJI_JOINER} from 'src/modules/chat/emoji';
|
||||||
|
|
||||||
export default class Input extends Module {
|
export default class Input extends Module {
|
||||||
constructor(...args) {
|
constructor(...args) {
|
||||||
|
@ -405,6 +406,9 @@ export default class Input extends Module {
|
||||||
t.log.error(err);
|
t.log.error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// replace ZERO WIDTH JOINER with custom joiner so combined emoji work
|
||||||
|
inst.autocompleteInputRef.setValue(inst.chatInputRef.value.replace('\u{200d}', EMOJI_JOINER));
|
||||||
|
|
||||||
originalOnMessageSend.call(this, event);
|
originalOnMessageSend.call(this, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue