1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 08:28:31 +00:00

more specific selection for gift sub button

This commit is contained in:
Jamah Akbary 2021-11-20 19:20:23 +01:00
parent 434a8d5fed
commit 28928e5278
2 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ export default class ViewerCards extends Module {
this.last_login = null;
this.settings.add('chat.viewer-cards.hide-gift-subscribe-button', {
this.settings.add('chat.viewer-cards.viewer-card-gift-subscribe-button', {
default: false,
ui: {
path: 'Chat > Viewer Cards >> Appearance',
@ -61,8 +61,8 @@ 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.chat.context.getChanges('chat.viewer-cards.hide-gift-subscribe-button', val =>
this.css_tweaks.toggleHide('hide-gift-subscribe-button', val)
this.chat.context.getChanges('chat.viewer-cards.viewer-card-gift-subscribe-button', val =>
this.css_tweaks.toggleHide('viewer-card-gift-subscribe-button', val)
);
this.on('..:update-colors', this.refreshStyle, this);

View file

@ -48,7 +48,7 @@ const CLASSES = {
'celebration': 'body .celebration__overlay',
'mod-view': '.chat-input__buttons-container a[href*="/moderator"]',
'hide-gift-subscribe-button': 'button[data-test-selector="gift-subscribe-button"]'
'viewer-card-gift-subscribe-button': '.viewer-card button[data-test-selector="gift-subscribe-button"]'
};