From 44e30e985d7634162ec6f5ec59981980d5e7d0a3 Mon Sep 17 00:00:00 2001 From: SirStendec Date: Tue, 16 Jan 2024 13:59:39 -0500 Subject: [PATCH] 4.66.0 * Added: Option to hide emote tool-tips from the FFZ Emote Menu, which can improve performance. * Changed: Re-add support for older browsers that do not support `crypto.randomUUID()`. I do not consider this a bug, since users should realistically not be on browsers that old for their own safety, but it is a small enough change that I'll allow it. * Fixed: The option to report emotes not appearing on emote cards for Twitch emotes. (Closes #1450) * Fixed: Make rich embeds in Chat on Videos slightly narrower so they don't get cut off. * API Added: Chat message objects now have `ffz_first_msg` and `ffz_returning` flags for use by add-ons. * API Fixed: Cut down on unnecessary warning logging from `createElement` --- package.json | 2 +- src/sites/twitch-twilight/index.js | 2 +- .../modules/chat/emote_menu.jsx | 23 ++++++++++++++--- .../twitch-twilight/modules/chat/index.js | 3 +++ src/sites/twitch-twilight/styles/chat.scss | 3 +++ src/utilities/dom.ts | 5 ++-- src/utilities/object.ts | 25 +++++++++++++++++-- 7 files changed, 53 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 99447bdd..45fa8f95 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.65.1", + "version": "4.66.0", "description": "FrankerFaceZ is a Twitch enhancement suite.", "private": true, "license": "Apache-2.0", diff --git a/src/sites/twitch-twilight/index.js b/src/sites/twitch-twilight/index.js index 378b7adb..0caa66e7 100644 --- a/src/sites/twitch-twilight/index.js +++ b/src/sites/twitch-twilight/index.js @@ -294,7 +294,7 @@ Twilight.KNOWN_MODULES['algolia-search'].use_result = true; Twilight.KNOWN_MODULES['algolia-search'].chunks = 'core'; Twilight.KNOWN_MODULES['user-report'].use_result = true; -Twilight.KNOWN_MODULES['user-report'].chunks = 'core'; +Twilight.KNOWN_MODULES['user-report'].chunks = n => ! n || n.includes('core') || n.includes('common'); Twilight.KNOWN_MODULES['sub-form'].use_result = true; Twilight.KNOWN_MODULES['sub-form'].chunks = 'core'; diff --git a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx index 84d9b771..2d70fa0f 100644 --- a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx +++ b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx @@ -322,6 +322,16 @@ export default class EmoteMenu extends Module { } }); + this.settings.add('chat.emote-menu.tooltips', { + default: true, + ui: { + path: 'Chat > Emote Menu >> Appearance', + title: 'Display emote preview tool-tips in the FFZ Emote Menu.', + component: 'setting-check-box', + description: 'You may wish to disable this for performance reasons.' + } + }); + this.settings.add('chat.emote-menu.show-emoji', { default: true, ui: { @@ -418,6 +428,7 @@ export default class EmoteMenu extends Module { 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.show-emoji', rebuild); + this.chat.context.on('changed:chat.emote-menu.tooltips', rebuild); this.chat.context.on('changed:chat.fix-bad-emotes', rebuild); this.chat.context.on('changed:chat.emote-menu.effect-tab', rebuild); this.chat.context.on('changed:chat.emote-menu.sort-emotes', rebuild); @@ -909,7 +920,9 @@ export default class EmoteMenu extends Module { has_modifiers = Array.isArray(modifiers) && modifiers.length > 0, //has_menu = has_modifiers && this.state.open_menu == emote.id, animated = this.props.animated, - hidden = visibility && emote.hidden; + hidden = visibility && emote.hidden, + + tt = t.chat.context.get('chat.emote-menu.tooltips'); let src, srcSet; if ( animated && emote.animSrc ) { @@ -922,7 +935,7 @@ export default class EmoteMenu extends Module { return (