diff --git a/package.json b/package.json index 8acfbaf8..20bb872c 100755 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx index d6d174b5..3a57fadd 100644 --- a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx +++ b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx @@ -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); diff --git a/src/sites/twitch-twilight/modules/css_tweaks/index.js b/src/sites/twitch-twilight/modules/css_tweaks/index.js index 6ea7d4ec..3191bd97 100644 --- a/src/sites/twitch-twilight/modules/css_tweaks/index.js +++ b/src/sites/twitch-twilight/modules/css_tweaks/index.js @@ -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();