From 6a7ac8c19404cf69809825d3469e097475cdcefa Mon Sep 17 00:00:00 2001 From: SirStendec Date: Fri, 11 Feb 2022 16:35:06 -0500 Subject: [PATCH] 4.32.1 * Fixed: FFZ no longer working correctly for Safari users owing to poor regex support. Safari users will be unable to use the Emoji Joiner Workaround introduced in 4.32.0. --- package.json | 2 +- src/modules/chat/emoji.js | 48 +++++++++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 1e3277d5..781801aa 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.32.0", + "version": "4.32.1", "description": "FrankerFaceZ is a Twitch enhancement suite.", "private": true, "license": "Apache-2.0", diff --git a/src/modules/chat/emoji.js b/src/modules/chat/emoji.js index 717749ab..f9564bcf 100644 --- a/src/modules/chat/emoji.js +++ b/src/modules/chat/emoji.js @@ -48,7 +48,17 @@ export const SKIN_TONES = { 5: '1f3ff' }; -export const JOINER_REPLACEMENT = /(? Behavior >> Emoji', - title: 'Emoji Joiner Workaround', - description: 'This feature is intended to allow the use of combined emoji in supported clients. This is required due to a bug in TMI that strips ZWJ characters from chat messages. [Visit the original issue](https://github.com/FrankerFaceZ/FrankerFaceZ/issues/1147) for more details.', - component: 'setting-select-box', - data: [ - {value: 0, title: 'Disabled'}, - {value: 1, title: 'Display Only'}, - {value: 2, title: 'Display and Send'} - ] - } - }); + if (enable_replace_joiner) + this.settings.add('chat.emoji.replace-joiner', { + default: 2, + ui: { + path: 'Chat > Behavior >> Emoji', + title: 'Emoji Joiner Workaround', + description: 'This feature is intended to allow the use of combined emoji in supported clients. This is required due to a bug in TMI that strips ZWJ characters from chat messages. [Visit the original issue](https://github.com/FrankerFaceZ/FrankerFaceZ/issues/1147) for more details.', + component: 'setting-select-box', + data: [ + {value: 0, title: 'Disabled'}, + {value: 1, title: 'Display Only'}, + {value: 2, title: 'Display and Send'} + ] + } + }); + else { + this.log.warn('This browser does not support regexp lookbehind. The "Emoji Joiner Workaround" feature will be disabled.'); + + this.settings.add('chat.emoji.replace-joiner', { + process() { return 0 } + }); + } this.settings.add('chat.emoji.style', { default: 'twitter',