1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

Add a setting to disable fixing bad emotes. People are the worst.

This commit is contained in:
SirStendec 2017-12-13 20:22:11 -05:00
parent 8e364e7d84
commit ac6663053f
3 changed files with 13 additions and 1 deletions

View file

@ -56,6 +56,7 @@ export default class Emotes extends Module {
super(...args);
this.inject('socket');
this.inject('settings');
this.twitch_inventory_sets = [];
this.__twitch_emote_to_set = new Map;
@ -67,6 +68,16 @@ export default class Emotes extends Module {
this.emote_sets = {};
this._set_refs = {};
this._set_timers = {};
this.settings.add('chat.fix-bad-emotes', {
default: true,
ui: {
path: 'Chat > Appearance >> Emotes',
title: 'Fix Bad Twitch Global Emotes',
description: 'Clean up the images for bad Twitch global emotes, removing white borders and solid backgrounds.',
component: 'setting-check-box'
}
});
}
onEnable() {

View file

@ -716,7 +716,7 @@ export const TwitchEmotes = {
let src, srcSet;
const replacement = REPLACEMENTS[e_id];
if ( replacement ) {
if ( replacement && this.context.get('chat.fix-bad-emotes') ) {
src = `${REPLACEMENT_BASE}${replacement}`;
srcSet = '';

View file

@ -291,6 +291,7 @@ export default class ChatHook extends Module {
this.chat.context.on('changed:chat.lines.borders', this.updateLineBorders, this);
this.chat.context.on('changed:chat.filtering.highlight-mentions', this.updateMentionCSS, this);
this.chat.context.on('changed:chat.filtering.highlight-tokens', this.updateMentionCSS, this);
this.chat.context.on('changed:chat.fix-bad-emotes', this.updateChatLines, this);
this.chat.context.on('changed:chat.lines.alternate', val => {
this.css_tweaks.toggle('chat-rows', val);