mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-29 23:58:31 +00:00
4.23.2
* Changed: Animated Emotes is now set to Enabled by default, to reflect the vanilla Twitch experience. * Fixed: Native animated emotes not appearing with animation. * Fixed: Typo in the tooltip for Playback Statistics metadata. * Maintenance: Update the `@ffz/icu-msgparser` dependency.
This commit is contained in:
parent
2a57ecb8a7
commit
ce38c3c251
10 changed files with 80 additions and 59 deletions
|
@ -1,9 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
import {BAD_HOTKEYS} from 'utilities/constants';
|
||||
import {BAD_HOTKEYS, TWITCH_EMOTE_V2} from 'utilities/constants';
|
||||
|
||||
const HOP = Object.prototype.hasOwnProperty;
|
||||
|
||||
export function getTwitchEmoteURL(id, scale, animated = false, dark = true) {
|
||||
return `${TWITCH_EMOTE_V2}/${id}/${animated ? 'default' : 'static'}/${dark ? 'dark' : 'light'}/${scale}.0`
|
||||
}
|
||||
|
||||
export function getTwitchEmoteSrcSet(id, animated = false, dark = true, big = false) {
|
||||
if ( big )
|
||||
return `${getTwitchEmoteURL(id, 2, animated, dark)} 1x, ${getTwitchEmoteURL(id, 4, animated, dark)} 2x`;
|
||||
|
||||
return `${getTwitchEmoteURL(id, 1, animated, dark)} 1x, ${getTwitchEmoteURL(id, 2, animated, dark)} 2x, ${getTwitchEmoteURL(id, 4, animated, dark)} 4x`;
|
||||
}
|
||||
|
||||
export function isValidShortcut(key) {
|
||||
if ( ! key )
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue