mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 10:06:54 +00:00
4.15.2
* Added: Option to display all emotes in the same tab of the emote menu. (Closes #684) * Added: Button in the emote menu that opens the FFZ Control Center to `Chat > Emote Menu`. * Changed: Start using Twitch for all emote information rather than the FFZ socket cluster. * Fixed: When an emoji skin tone is set, use that skin tone for category icons if applicable. * Fixed: When reduced padding for the emote menu is enabled, reduce the padding around the navigation buttons.
This commit is contained in:
parent
a6ee3e5013
commit
742da82515
8 changed files with 396 additions and 247 deletions
|
@ -7,7 +7,7 @@
|
|||
import {sanitize, createElement} from 'utilities/dom';
|
||||
import {has, split_chars} from 'utilities/object';
|
||||
|
||||
import {TWITCH_EMOTE_BASE, REPLACEMENT_BASE, REPLACEMENTS} from 'utilities/constants';
|
||||
import {TWITCH_EMOTE_BASE, EmoteTypes, REPLACEMENT_BASE, REPLACEMENTS} from 'utilities/constants';
|
||||
|
||||
|
||||
const EMOTE_CLASS = 'chat-image chat-line__message--emote',
|
||||
|
@ -1011,7 +1011,7 @@ export const AddonEmotes = {
|
|||
</span>);
|
||||
},
|
||||
|
||||
tooltip(target, tip) {
|
||||
async tooltip(target, tip) {
|
||||
const ds = target.dataset,
|
||||
provider = ds.provider,
|
||||
modifiers = ds.modifierInfo;
|
||||
|
@ -1036,23 +1036,30 @@ export const AddonEmotes = {
|
|||
|
||||
if ( provider === 'twitch' ) {
|
||||
emote_id = parseInt(ds.id, 10);
|
||||
const set_id = this.emotes.getTwitchEmoteSet(emote_id, tip.rerender),
|
||||
emote_set = set_id != null && this.emotes.getTwitchSetChannel(set_id, tip.rerender);
|
||||
const set_id = hide_source ? null : await this.emotes.getTwitchEmoteSet(emote_id),
|
||||
emote_set = set_id != null && await this.emotes.getTwitchSetChannel(set_id);
|
||||
|
||||
preview = `//static-cdn.jtvnw.net/emoticons/v1/${ds.id}/3.0?_=preview`;
|
||||
preview = `${TWITCH_EMOTE_BASE}${ds.id}/3.0?_=preview`;
|
||||
fav_source = 'twitch';
|
||||
|
||||
if ( emote_set ) {
|
||||
source = emote_set.c_name;
|
||||
|
||||
if ( source === '--global--' || emote_id === 80393 )
|
||||
const type = emote_set.type;
|
||||
if ( type === EmoteTypes.Global )
|
||||
source = this.i18n.t('emote.global', 'Twitch Global');
|
||||
|
||||
else if ( source === '--twitch-turbo--' || source === 'turbo' || source === '--turbo-faces--' || source === '--prime--' || source === '--prime-faces--' )
|
||||
else if ( type === EmoteTypes.Prime || type === EmoteTypes.Turbo )
|
||||
source = this.i18n.t('emote.prime', 'Twitch Prime');
|
||||
|
||||
else
|
||||
source = this.i18n.t('tooltip.channel', 'Channel: {source}', {source});
|
||||
else if ( type === EmoteTypes.LimitedTime )
|
||||
source = this.i18n.t('emote.limited', 'Limited-Time Only Emote');
|
||||
|
||||
else if ( type === EmoteTypes.ChannelPoints )
|
||||
source = this.i18n.t('emote.points', 'Channel Points Emote');
|
||||
|
||||
else if ( type === EmoteTypes.Subscription && emote_set.owner?.login )
|
||||
source = this.i18n.t('tooltip.channel', 'Channel: {source}', {
|
||||
source: emote_set.owner.displayName || emote_set.owner.login
|
||||
});
|
||||
}
|
||||
|
||||
} else if ( provider === 'ffz' ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue