mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 18:06:55 +00:00
4.0.0-rc19
* Added: Option to hide Squad Streaming banners on channel pages. * Changed: Rewrite the entire i18n system to use the standard ICU message format. * Changed: Render the context menu for chat messages in Chat on Videos. * Fixed: Badges not appearing correctly in chat. * Fixed: Messages in Chat on Videos with embeds appearing too wide.
This commit is contained in:
parent
8bc25b8d5f
commit
35316b8827
43 changed files with 1061 additions and 348 deletions
|
@ -284,7 +284,7 @@ export default class Badges extends Module {
|
|||
let title = bd.title || global_badge.title;
|
||||
if ( d.data ) {
|
||||
if ( d.badge === 'subscriber' ) {
|
||||
title = this.i18n.t('badges.subscriber.months', '%{title} (%{count} Month%{count|en_plural})', {
|
||||
title = this.i18n.t('badges.subscriber.months', '{title} ({count,number} Month{count,en_plural})', {
|
||||
title,
|
||||
count: d.data
|
||||
});
|
||||
|
@ -645,16 +645,23 @@ export default class Badges extends Module {
|
|||
return b;
|
||||
}
|
||||
|
||||
hasTwitchBadges() {
|
||||
return !! this.twitch_badges
|
||||
}
|
||||
|
||||
updateTwitchBadges(badges) {
|
||||
if ( ! badges )
|
||||
if ( ! Array.isArray(badges) )
|
||||
this.twitch_badges = badges;
|
||||
else {
|
||||
const b = {};
|
||||
for(const data of badges) {
|
||||
const sid = data.setID,
|
||||
bs = b[sid] = b[sid] || {__game: /_\d+$/.test(sid)};
|
||||
let b = null;
|
||||
if ( badges.length ) {
|
||||
b = {};
|
||||
for(const data of badges) {
|
||||
const sid = data.setID,
|
||||
bs = b[sid] = b[sid] || {__game: /_\d+$/.test(sid)};
|
||||
|
||||
bs[data.version] = data;
|
||||
bs[data.version] = data;
|
||||
}
|
||||
}
|
||||
|
||||
this.twitch_badges = b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue