diff --git a/package.json b/package.json index 224358a2..3d1be886 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.28.0", + "version": "4.28.1", "description": "FrankerFaceZ is a Twitch enhancement suite.", "private": true, "license": "Apache-2.0", diff --git a/src/sites/clips/chat.jsx b/src/sites/clips/chat.jsx index 63195af6..7d690b0e 100644 --- a/src/sites/clips/chat.jsx +++ b/src/sites/clips/chat.jsx @@ -137,6 +137,19 @@ export default class Chat extends Module { } + // ======================================================================== + // API Compliance + // ======================================================================== + + addNotice() { // eslint-disable-line class-methods-use-this + return false; + } + + sendMessage() { // eslint-disable-line class-methods-use-this + return null; + } + + // ======================================================================== // Room Handling // ======================================================================== diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js index 19317949..85f219ef 100644 --- a/src/sites/twitch-twilight/modules/chat/index.js +++ b/src/sites/twitch-twilight/modules/chat/index.js @@ -1922,6 +1922,30 @@ export default class ChatHook extends Module { } + addNotice(room, message) { + if ( ! room ) + return false; + + if ( room.startsWith('#') ) + room = room.slice(1); + + room = room.toLowerCase(); + + for(const inst of this.ChatService.instances) { + if ( inst.props.channelLogin.toLowerCase() === room ) { + inst.addMessage({ + type: this.chat_types.Notice, + message + }); + + return true; + } + } + + return false; + } + + sendMessage(room, message) { const service = this.ChatService.first; diff --git a/src/sites/twitch-twilight/modules/theme/index.js b/src/sites/twitch-twilight/modules/theme/index.js index ff44f03a..220cafa4 100644 --- a/src/sites/twitch-twilight/modules/theme/index.js +++ b/src/sites/twitch-twilight/modules/theme/index.js @@ -445,8 +445,10 @@ export default class ThemeEngine extends Module { this.toggleNormalizer(chat_bits.length || bits.length); + const selector = dark ? '' : `:not(.settings-menu-button-component--forced-dark-theme)`; + if ( bits.length ) - this.css_tweaks.set('colors', `body,body .tw-root--theme-light,body .tw-root--theme-dark {${bits.join('\n')}}.channel-info-content .tw-accent-region,.channel-info-content div[class^="ScAccentRegion"]{${accent_bits.join('\n')}}`); + this.css_tweaks.set('colors', `body,body .tw-root--theme-light,body .tw-root--theme-dark${selector} {${bits.join('\n')}}.channel-info-content .tw-accent-region,.channel-info-content div[class^="ScAccentRegion"]{${accent_bits.join('\n')}}`); else this.css_tweaks.delete('colors'); }