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',