diff --git a/src/sites/twitch-twilight/modules/chat/viewer_card.jsx b/src/sites/twitch-twilight/modules/chat/viewer_card.jsx index 724da3fb..f022ae37 100644 --- a/src/sites/twitch-twilight/modules/chat/viewer_card.jsx +++ b/src/sites/twitch-twilight/modules/chat/viewer_card.jsx @@ -17,6 +17,16 @@ export default class ViewerCards extends Module { this.last_login = null; + this.settings.add('chat.viewer-cards.hide-gift-subscribe-button', { + default: '', + ui: { + path: 'Chat > Viewer Cards >> Appearance', + title: 'Hide the gift-subscribe-button on the viewer card', + component: 'setting-check-box' + }, + changed: val => this.css_tweaks.toggle('hide-gift-subscribe-button', val) + }); + this.settings.add('chat.viewer-cards.highlight-chat', { default: false, ui: { @@ -52,6 +62,7 @@ export default class ViewerCards extends Module { onEnable() { this.chat.context.on('changed:chat.viewer-cards.highlight-chat', this.refreshStyle, this); this.chat.context.on('changed:chat.viewer-cards.color', this.refreshStyle, this); + this.toggle('hide-gift-subscribe-button', this.settings.get('chat.viewer-cards.hide-gift-subscribe-button')); this.on('..:update-colors', this.refreshStyle, this); this.ViewerCard.on('mount', this.updateCard, this); diff --git a/src/sites/twitch-twilight/modules/css_tweaks/styles/hide-gift-subscribe-button.scss b/src/sites/twitch-twilight/modules/css_tweaks/styles/hide-gift-subscribe-button.scss new file mode 100644 index 00000000..88562edc --- /dev/null +++ b/src/sites/twitch-twilight/modules/css_tweaks/styles/hide-gift-subscribe-button.scss @@ -0,0 +1,3 @@ +button[data-test-selector="gift-subscribe-button"] { + display: none !important; +} \ No newline at end of file