mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-02 16:08:31 +00:00
4.21.2
* Added: Option to disable rendering of emotes in chat. * Fixed: Thumbnails not being hidden on the home page of Twitch in some recommendation categories.
This commit is contained in:
parent
2f41f520af
commit
b685ed3ce7
11 changed files with 86 additions and 28 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.21.1",
|
"version": "4.21.2",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
@ -86,6 +86,23 @@ export default class Emotes extends Module {
|
||||||
this._set_refs = {};
|
this._set_refs = {};
|
||||||
this._set_timers = {};
|
this._set_timers = {};
|
||||||
|
|
||||||
|
this.settings.add('chat.emotes.enabled', {
|
||||||
|
default: 2,
|
||||||
|
ui: {
|
||||||
|
path: 'Chat > Appearance >> Emotes',
|
||||||
|
title: 'Display Emotes',
|
||||||
|
sort: -100,
|
||||||
|
force_seen: true,
|
||||||
|
description: 'If you do not wish to see emotes, you can disable them here.',
|
||||||
|
component: 'setting-select-box',
|
||||||
|
data: [
|
||||||
|
{value: 0, title: 'Disabled'},
|
||||||
|
{value: 1, title: 'Twitch Only'},
|
||||||
|
{value: 2, title: 'Enabled'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.settings.add('chat.emotes.2x', {
|
this.settings.add('chat.emotes.2x', {
|
||||||
default: false,
|
default: false,
|
||||||
ui: {
|
ui: {
|
||||||
|
|
|
@ -964,6 +964,7 @@ export default class Chat extends Module {
|
||||||
},
|
},
|
||||||
ui: {
|
ui: {
|
||||||
path: 'Chat > Appearance >> Emotes',
|
path: 'Chat > Appearance >> Emotes',
|
||||||
|
sort: -50,
|
||||||
title: 'Animated Emotes',
|
title: 'Animated Emotes',
|
||||||
|
|
||||||
default(ctx) {
|
default(ctx) {
|
||||||
|
|
|
@ -1437,6 +1437,9 @@ export const AddonEmotes = {
|
||||||
if ( ! tokens || ! tokens.length )
|
if ( ! tokens || ! tokens.length )
|
||||||
return tokens;
|
return tokens;
|
||||||
|
|
||||||
|
if ( this.context.get('chat.emotes.enabled') !== 2 )
|
||||||
|
return tokens;
|
||||||
|
|
||||||
const emotes = this.emotes.getEmotes(
|
const emotes = this.emotes.getEmotes(
|
||||||
msg.user.id,
|
msg.user.id,
|
||||||
msg.user.login,
|
msg.user.login,
|
||||||
|
@ -1618,6 +1621,9 @@ export const TwitchEmotes = {
|
||||||
if ( ! msg.ffz_emotes )
|
if ( ! msg.ffz_emotes )
|
||||||
return tokens;
|
return tokens;
|
||||||
|
|
||||||
|
if ( this.context.get('chat.emotes.enabled') < 1 )
|
||||||
|
return tokens;
|
||||||
|
|
||||||
const data = msg.ffz_emotes,
|
const data = msg.ffz_emotes,
|
||||||
big = this.context.get('chat.emotes.2x'),
|
big = this.context.get('chat.emotes.2x'),
|
||||||
use_replacements = this.context.get('chat.fix-bad-emotes'),
|
use_replacements = this.context.get('chat.fix-bad-emotes'),
|
||||||
|
|
|
@ -33,6 +33,7 @@ export default class Line extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnable() {
|
onEnable() {
|
||||||
|
this.chat.context.on('changed:chat.emotes.enabled', this.updateLines, this);
|
||||||
this.chat.context.on('changed:chat.emotes.2x', this.updateLines, this);
|
this.chat.context.on('changed:chat.emotes.2x', this.updateLines, this);
|
||||||
this.chat.context.on('changed:chat.emotes.animated', this.updateLines, this);
|
this.chat.context.on('changed:chat.emotes.animated', this.updateLines, this);
|
||||||
this.chat.context.on('changed:chat.emoji.style', this.updateLines, this);
|
this.chat.context.on('changed:chat.emoji.style', this.updateLines, this);
|
||||||
|
|
|
@ -13,7 +13,7 @@ import Twilight from 'site';
|
||||||
import Module from 'utilities/module';
|
import Module from 'utilities/module';
|
||||||
|
|
||||||
import SUB_STATUS from './sub_status.gql';
|
import SUB_STATUS from './sub_status.gql';
|
||||||
import Tooltip from 'src/utilities/tooltip';
|
//import Tooltip from 'src/utilities/tooltip';
|
||||||
|
|
||||||
const TIERS = {
|
const TIERS = {
|
||||||
1000: 'Tier 1',
|
1000: 'Tier 1',
|
||||||
|
@ -363,6 +363,7 @@ export default class EmoteMenu extends Module {
|
||||||
inst.rebuildData();
|
inst.rebuildData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.chat.context.on('changed:chat.emotes.enabled', rebuild);
|
||||||
this.chat.context.on('changed:chat.emote-menu.modifiers', rebuild);
|
this.chat.context.on('changed:chat.emote-menu.modifiers', rebuild);
|
||||||
this.chat.context.on('changed:chat.emote-menu.show-emoji', rebuild);
|
this.chat.context.on('changed:chat.emote-menu.show-emoji', rebuild);
|
||||||
this.chat.context.on('changed:chat.fix-bad-emotes', rebuild);
|
this.chat.context.on('changed:chat.fix-bad-emotes', rebuild);
|
||||||
|
@ -2058,36 +2059,38 @@ export default class EmoteMenu extends Module {
|
||||||
|
|
||||||
|
|
||||||
// Finally, emotes added by FrankerFaceZ.
|
// Finally, emotes added by FrankerFaceZ.
|
||||||
const me = t.site.getUser();
|
if ( t.chat.context.get('chat.emotes.enabled') > 1 ) {
|
||||||
if ( me ) {
|
const me = t.site.getUser();
|
||||||
const ffz_room = t.emotes.getRoomSetsWithSources(me.id, me.login, props.channel_id, null),
|
if ( me ) {
|
||||||
ffz_global = t.emotes.getGlobalSetsWithSources(me.id, me.login),
|
const ffz_room = t.emotes.getRoomSetsWithSources(me.id, me.login, props.channel_id, null),
|
||||||
seen_favorites = {};
|
ffz_global = t.emotes.getGlobalSetsWithSources(me.id, me.login),
|
||||||
|
seen_favorites = {};
|
||||||
|
|
||||||
let grouped_sets = {};
|
let grouped_sets = {};
|
||||||
|
|
||||||
for(const [emote_set, provider] of ffz_room) {
|
for(const [emote_set, provider] of ffz_room) {
|
||||||
const section = this.processFFZSet(emote_set, provider, favorites, seen_favorites, grouped_sets);
|
const section = this.processFFZSet(emote_set, provider, favorites, seen_favorites, grouped_sets);
|
||||||
if ( section ) {
|
if ( section ) {
|
||||||
section.emotes.sort(sort_emotes);
|
section.emotes.sort(sort_emotes);
|
||||||
|
|
||||||
if ( ! channel.includes(section) )
|
if ( ! channel.includes(section) )
|
||||||
channel.push(section);
|
channel.push(section);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
grouped_sets = {};
|
grouped_sets = {};
|
||||||
|
|
||||||
for(const [emote_set, provider] of ffz_global) {
|
for(const [emote_set, provider] of ffz_global) {
|
||||||
const section = this.processFFZSet(emote_set, provider, favorites, seen_favorites, grouped_sets);
|
const section = this.processFFZSet(emote_set, provider, favorites, seen_favorites, grouped_sets);
|
||||||
if ( section ) {
|
if ( section ) {
|
||||||
section.emotes.sort(sort_emotes);
|
section.emotes.sort(sort_emotes);
|
||||||
|
|
||||||
if ( ! all.includes(section) )
|
if ( ! all.includes(section) )
|
||||||
all.push(section);
|
all.push(section);
|
||||||
|
|
||||||
if ( ! channel.includes(section) && maybe_call(section.force_global, this, emote_set, props.channel_data && props.channel_data.user, me) )
|
if ( ! channel.includes(section) && maybe_call(section.force_global, this, emote_set, props.channel_data && props.channel_data.user, me) )
|
||||||
channel.push(section);
|
channel.push(section);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,7 @@ export default class Input extends Module {
|
||||||
this.CommandSuggestions.on('mount', this.overrideCommandMatcher, this);
|
this.CommandSuggestions.on('mount', this.overrideCommandMatcher, this);
|
||||||
|
|
||||||
this.chat.context.on('changed:chat.emotes.animated', this.uncacheTabCompletion, this);
|
this.chat.context.on('changed:chat.emotes.animated', this.uncacheTabCompletion, this);
|
||||||
|
this.chat.context.on('changed:chat.emotes.enabled', this.uncacheTabCompletion, this);
|
||||||
this.on('chat.emotes:change-hidden', this.uncacheTabCompletion, this);
|
this.on('chat.emotes:change-hidden', this.uncacheTabCompletion, this);
|
||||||
this.on('chat.emotes:change-set-hidden', this.uncacheTabCompletion, this);
|
this.on('chat.emotes:change-set-hidden', this.uncacheTabCompletion, this);
|
||||||
this.on('chat.emotes:change-favorite', this.uncacheTabCompletion, this);
|
this.on('chat.emotes:change-favorite', this.uncacheTabCompletion, this);
|
||||||
|
@ -500,10 +501,11 @@ export default class Input extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
inst.getMatchedEmotes = function(input) {
|
inst.getMatchedEmotes = function(input) {
|
||||||
|
const setting = t.chat.context.get('chat.emotes.enabled');
|
||||||
const limitResults = t.chat.context.get('chat.tab-complete.limit-results');
|
const limitResults = t.chat.context.get('chat.tab-complete.limit-results');
|
||||||
let results = t.getTwitchEmoteSuggestions(input, this);
|
let results = setting ? t.getTwitchEmoteSuggestions(input, this) : [];
|
||||||
|
|
||||||
if ( t.chat.context.get('chat.tab-complete.ffz-emotes') ) {
|
if ( setting > 1 && t.chat.context.get('chat.tab-complete.ffz-emotes') ) {
|
||||||
const ffz_emotes = t.getEmoteSuggestions(input, this);
|
const ffz_emotes = t.getEmoteSuggestions(input, this);
|
||||||
if ( Array.isArray(ffz_emotes) && ffz_emotes.length )
|
if ( Array.isArray(ffz_emotes) && ffz_emotes.length )
|
||||||
results = results.concat(ffz_emotes);
|
results = results.concat(ffz_emotes);
|
||||||
|
|
|
@ -60,6 +60,7 @@ export default class ChatLine extends Module {
|
||||||
this.on('chat:update-lines', this.updateLines, this);
|
this.on('chat:update-lines', this.updateLines, this);
|
||||||
this.on('i18n:update', this.updateLines, this);
|
this.on('i18n:update', this.updateLines, this);
|
||||||
|
|
||||||
|
this.chat.context.on('changed:chat.emotes.enabled', this.updateLines, this);
|
||||||
this.chat.context.on('changed:chat.emotes.2x', this.updateLines, this);
|
this.chat.context.on('changed:chat.emotes.2x', this.updateLines, this);
|
||||||
this.chat.context.on('changed:chat.emotes.animated', this.updateLines, this);
|
this.chat.context.on('changed:chat.emotes.animated', this.updateLines, this);
|
||||||
this.chat.context.on('changed:chat.emoji.style', this.updateLines, this);
|
this.chat.context.on('changed:chat.emoji.style', this.updateLines, this);
|
||||||
|
|
|
@ -331,7 +331,7 @@ export default class Directory extends SiteModule {
|
||||||
if ( ! props?.channelLogin )
|
if ( ! props?.channelLogin )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const game = props.gameTitle || props.trackingProps?.categoryName || props.trackingProps?.category,
|
const game = props.gameTitle || props.trackingProps?.categoryName || props.trackingProps?.category || props.contextualCardActionProps?.props?.categoryName,
|
||||||
tags = props.tagListProps?.tags;
|
tags = props.tagListProps?.tags;
|
||||||
|
|
||||||
let bad_tag = false;
|
let bad_tag = false;
|
||||||
|
|
26
src/sites/twitch-twilight/styles/easteregg.scss
Normal file
26
src/sites/twitch-twilight/styles/easteregg.scss
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
.tw-animated-glitch-logo {
|
||||||
|
&:hover {
|
||||||
|
animation: ffz-spinlogo 0.75s ease-in 2s 1 forwards;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes ffz-spinlogo {
|
||||||
|
0% {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
70% {
|
||||||
|
transform: rotate(200deg);
|
||||||
|
}
|
||||||
|
85% {
|
||||||
|
transform: rotate(160deg);
|
||||||
|
}
|
||||||
|
95% {
|
||||||
|
transform: rotate(185deg);
|
||||||
|
}
|
||||||
|
97% {
|
||||||
|
transform: rotate(175deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,4 +11,5 @@
|
||||||
|
|
||||||
@import 'host_options';
|
@import 'host_options';
|
||||||
@import 'featured_follow';
|
@import 'featured_follow';
|
||||||
@import 'mod_card';
|
@import 'mod_card';
|
||||||
|
@import 'easteregg';
|
Loading…
Add table
Add a link
Reference in a new issue