1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 01:56:55 +00:00

hiding sub gift button on viewerCard

This commit is contained in:
Jamah Akbary 2021-11-15 11:04:17 +01:00
parent 97c96be276
commit cedf5503bb
2 changed files with 14 additions and 0 deletions

View file

@ -17,6 +17,16 @@ export default class ViewerCards extends Module {
this.last_login = null; 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', { this.settings.add('chat.viewer-cards.highlight-chat', {
default: false, default: false,
ui: { ui: {
@ -52,6 +62,7 @@ export default class ViewerCards extends Module {
onEnable() { onEnable() {
this.chat.context.on('changed:chat.viewer-cards.highlight-chat', this.refreshStyle, this); 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.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.on('..:update-colors', this.refreshStyle, this);
this.ViewerCard.on('mount', this.updateCard, this); this.ViewerCard.on('mount', this.updateCard, this);

View file

@ -0,0 +1,3 @@
button[data-test-selector="gift-subscribe-button"] {
display: none !important;
}