mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 01:56:55 +00:00
4.19.8
* Added: Setting to hide Twitch's new `Celebrations` feature. * Fixed: Unlocked Bits Emotes not appearing correctly in the Channel tab of the FFZ Emotes Menu.
This commit is contained in:
parent
80acdc9c30
commit
6df087c520
3 changed files with 33 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "frankerfacez",
|
||||
"author": "Dan Salvato LLC",
|
||||
"version": "4.19.7",
|
||||
"version": "4.19.8",
|
||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
|
|
|
@ -1314,6 +1314,8 @@ export default class EmoteMenu extends Module {
|
|||
twitch_favorites = t.emotes.getFavorites('twitch'),
|
||||
twitch_seen = new Set,
|
||||
|
||||
bits_unlocked = [],
|
||||
|
||||
//twitch_seen_favorites = new Set,
|
||||
|
||||
grouped_sets = {},
|
||||
|
@ -1492,6 +1494,9 @@ export default class EmoteMenu extends Module {
|
|||
|
||||
emotes.push(em);
|
||||
|
||||
if ( is_bits )
|
||||
bits_unlocked.push(em);
|
||||
|
||||
if ( is_fav && ! twitch_seen.has(id) )
|
||||
favorites.push(em);
|
||||
|
||||
|
@ -1599,6 +1604,8 @@ export default class EmoteMenu extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const seen_bits = new Set;
|
||||
|
||||
if ( Array.isArray(bits) ) {
|
||||
for(const emote of bits) {
|
||||
if ( ! emote || ! emote.id || ! emote.bitsBadgeTierSummary )
|
||||
|
@ -1638,13 +1645,23 @@ export default class EmoteMenu extends Module {
|
|||
|
||||
emotes.push(em);
|
||||
|
||||
if ( ! locked && is_fav )
|
||||
if ( ! locked && is_fav && ! twitch_seen.has(id) )
|
||||
favorites.push(em);
|
||||
|
||||
seen_bits.add(id);
|
||||
twitch_seen.add(id);
|
||||
}
|
||||
}
|
||||
|
||||
if ( bits_unlocked.length ) {
|
||||
for(const emote of bits_unlocked) {
|
||||
if ( seen_bits.has(emote.id) )
|
||||
continue;
|
||||
|
||||
emotes.push(emote);
|
||||
}
|
||||
}
|
||||
|
||||
if ( emotes.length ) {
|
||||
emotes.sort(sort_emotes);
|
||||
channel.push(section);
|
||||
|
|
|
@ -37,7 +37,8 @@ const CLASSES = {
|
|||
'dir-live-ind': '.preview-card[data-ffz-type="live"] .tw-channel-status-text-indicator,.live-channel-card:not([data-a-target*="host"]) .stream-type-indicator.stream-type-indicator--live,.stream-thumbnail__card .stream-type-indicator.stream-type-indicator--live,.preview-card .stream-type-indicator.stream-type-indicator--live,.preview-card .preview-card-stat.preview-card-stat--live',
|
||||
'profile-hover': '.preview-card .tw-relative:hover .ffz-channel-avatar',
|
||||
'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]',
|
||||
'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator'
|
||||
'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator',
|
||||
'celebration': 'body .celebration__overlay'
|
||||
};
|
||||
|
||||
|
||||
|
@ -247,6 +248,17 @@ export default class CSSTweaks extends Module {
|
|||
|
||||
// Other?
|
||||
|
||||
this.settings.add('channel.show-celebrations', {
|
||||
default: true,
|
||||
ui: {
|
||||
path: 'Channel > Appearance >> General',
|
||||
title: 'Allow Celebrations to appear.',
|
||||
description: 'Celebrations are animations that cover the entire Twitch page.',
|
||||
component: 'setting-check-box'
|
||||
},
|
||||
changed: val => this.toggleHide('celebration', ! val)
|
||||
});
|
||||
|
||||
this.settings.add('layout.theme.global-font', {
|
||||
default: '',
|
||||
ui: {
|
||||
|
@ -323,6 +335,7 @@ export default class CSSTweaks extends Module {
|
|||
this.toggleHide('side-closed-friends', friends === 2);
|
||||
|
||||
this.toggleHide('whispers', !this.settings.get('whispers.show'));
|
||||
this.toggleHide('celebration', ! this.settings.get('channel.show-celebrations'));
|
||||
|
||||
this.updateFont();
|
||||
this.updateTopNav();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue