1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00
* Added: Emote Visibility Control for Emote Menu. You can now hide emotes you don't want from your emote menu. You still have them, and they'll still appear in chat if someone else uses them, but it helps keep the clutter down in your menu. (Closes #811)
* Added: Setting to toggle mute for the player when middle-clicking it. (Closes #812)
* Added: Setting to toggle the bold style applied to chat mentions. (Closes #816)
* Fixed: No background color being applied to Highlight My Message chat messages when using the new Twitch layout. Now, the default Twitch purple will be used when FFZ hasn't yet extracted the color for the current channel. Extracting the channel color is still broken at this time. (Closes #821)
* Fixed: The player volume resetting to 100% when changing channels. (Closes #820)
* Fixed: Chat appearing incorrectly when a custom width smaller than 340 pixels is set. (Closes #819)
This commit is contained in:
SirStendec 2020-06-23 17:17:00 -04:00
parent 1c311c89bf
commit 8c9a3aa8a4
15 changed files with 525 additions and 290 deletions

View file

@ -194,6 +194,52 @@ export default class Emotes extends Module {
}
// ========================================================================
// Hidden Checking
// ========================================================================
toggleHidden(source, id, value = null) {
const key = `hidden-emotes.${source}`,
p = this.settings.provider,
hidden = p.get(key, []),
idx = hidden.indexOf(id);
if ( value === null )
value = idx === -1;
if ( value && idx === -1 )
hidden.push(id);
else if ( ! value && idx !== -1 )
hidden.splice(idx, 1);
else
return;
if ( hidden.length )
p.set(key, hidden);
else
p.delete(key);
this.emit(':change-hidden', source, id, value);
}
isHidden(source, id) {
return this.getHidden(source).includes(id);
}
getHidden(source) {
return this.settings.provider.get(`hidden-emotes.${source}`, []);
}
setHidden(source, list) {
const key = `hidden-emotes.${source}`;
if ( ! Array.isArray(list) || ! list.length )
this.settings.provider.delete(key);
else
this.settings.provider.set(key, list);
}
// ========================================================================
// Favorite Checking
// ========================================================================