1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 18:26:57 +00:00

4.0.0-rc3.3.

* Update all usages of `tw-input` and `tw-select` to use the new, overly-verbose classes Twitch added.
* Add a few of the monkey faces to the local emote code to make them work.
* Override emotes when building the emote code <-> id map, to let emotes from higher sets override global emotes.
This commit is contained in:
SirStendec 2018-06-29 19:45:33 -04:00
parent 8befc8850b
commit 5626a3c389
20 changed files with 51 additions and 46 deletions

View file

@ -34,7 +34,12 @@ const REGEX_EMOTES = {
'\\:-?\\(': [':(', ':-('],
'\\:-?\\)': [':)', ':-)'],
'\\;-?(p|P)': [';p', ';P', ';-p', ';-P'],
'\\;-?\\)': [';)', ';-)']
'\\;-?\\)': [';)', ';-)'],
'#-?[\\\\/]': ['#/', '#-/', '#//', '#-//'],
':-?(?:7|L)': [':7', ':L', ':-7', ':-L'],
'\\&lt\\;\\]': ['<]'],
'\\:-?(S|s)': [':s', ':S', ':-s', ':-S'],
'\\:\\&gt\\;': [':>']
};
@ -598,12 +603,11 @@ export default class ChatHook extends Module {
for(const emote of set.emotes)
if ( emote ) {
const token = emote.token;
if ( has(REGEX_EMOTES, token) ) {
for(const token of REGEX_EMOTES[token] )
if ( ! has(emotes, token) )
emotes[token] = emote.id;
if ( Array.isArray(REGEX_EMOTES[token]) ) {
for(const tok of REGEX_EMOTES[token] )
emotes[tok] = emote.id;
} else if ( ! has(emotes, token) )
} else
emotes[token] = emote.id;
}