mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 18:06:55 +00:00
Merge b9a1719868
into 213c2195cc
This commit is contained in:
commit
785eb10980
3 changed files with 38 additions and 1 deletions
|
@ -17,6 +17,23 @@ export default class ViewerCards extends Module {
|
||||||
|
|
||||||
this.last_login = null;
|
this.last_login = null;
|
||||||
|
|
||||||
|
this.settings.add('chat.viewer-cards.viewer-card-gift-subscribe-button', {
|
||||||
|
requires: ['channel.hide-all-sub-gifting'],
|
||||||
|
default: null,
|
||||||
|
process(ctx, val) {
|
||||||
|
if ( val != null )
|
||||||
|
return val;
|
||||||
|
|
||||||
|
return ctx.get('channel.hide-all-sub-gifting')
|
||||||
|
},
|
||||||
|
ui: {
|
||||||
|
path: 'Chat > Viewer Cards >> Appearance',
|
||||||
|
title: 'Hide "Gift a Sub" button on viewer cards',
|
||||||
|
description: 'By default, this inherits its value from [Channel > Appearance > Hide all "Gift a Sub" button](~channel.appearance)',
|
||||||
|
component: 'setting-check-box'
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
this.settings.add('chat.viewer-cards.highlight-chat', {
|
this.settings.add('chat.viewer-cards.highlight-chat', {
|
||||||
default: false,
|
default: false,
|
||||||
ui: {
|
ui: {
|
||||||
|
@ -52,6 +69,9 @@ 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.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);
|
this.on('..:update-colors', this.refreshStyle, this);
|
||||||
|
|
||||||
this.ViewerCard.on('mount', this.updateCard, this);
|
this.ViewerCard.on('mount', this.updateCard, this);
|
||||||
|
|
|
@ -46,7 +46,9 @@ const CLASSES = {
|
||||||
'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]',
|
'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]',
|
||||||
'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator,.channel-info-content .tw-halo__indicator',
|
'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator,.channel-info-content .tw-halo__indicator',
|
||||||
'celebration': 'body .celebration__overlay',
|
'celebration': 'body .celebration__overlay',
|
||||||
'mod-view': '.chat-input__buttons-container a[href*="/moderator"]'
|
'mod-view': '.chat-input__buttons-container a[href*="/moderator"]',
|
||||||
|
|
||||||
|
'viewer-card-gift-subscribe-button': '.viewer-card button[data-test-selector="gift-subscribe-button"]'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -405,6 +407,16 @@ export default class CSSTweaks extends Module {
|
||||||
changed: val => this.toggle('hide-unfollow-button', val)
|
changed: val => this.toggle('hide-unfollow-button', val)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.settings.add('channel.hide-all-sub-gifting', {
|
||||||
|
default: false,
|
||||||
|
ui: {
|
||||||
|
path: 'Channel > Appearance >> General',
|
||||||
|
title: 'Hide all "Gift a Sub" button.',
|
||||||
|
component: 'setting-check-box'
|
||||||
|
},
|
||||||
|
changed: val => this.toggle('hide-all-sub-gifting', val)
|
||||||
|
});
|
||||||
|
|
||||||
this.settings.add('channel.hide-live-indicator', {
|
this.settings.add('channel.hide-live-indicator', {
|
||||||
requires: ['context.route.name'],
|
requires: ['context.route.name'],
|
||||||
process(ctx, val) {
|
process(ctx, val) {
|
||||||
|
@ -459,6 +471,7 @@ export default class CSSTweaks extends Module {
|
||||||
this.toggleHide('prime-offers', !this.settings.get('layout.prime-offers'));
|
this.toggleHide('prime-offers', !this.settings.get('layout.prime-offers'));
|
||||||
this.toggleHide('top-discover', !this.settings.get('layout.discover'));
|
this.toggleHide('top-discover', !this.settings.get('layout.discover'));
|
||||||
this.toggle('hide-unfollow-button', this.settings.get('channel.hide-unfollow'));
|
this.toggle('hide-unfollow-button', this.settings.get('channel.hide-unfollow'));
|
||||||
|
this.toggle('hide-all-sub-gifting', this.settings.get('channel.hide-all-sub-gifting'));
|
||||||
|
|
||||||
this.toggle('square-avatars', ! this.settings.get('channel.round-avatars'));
|
this.toggle('square-avatars', ! this.settings.get('channel.round-avatars'));
|
||||||
//this.toggleHide('not-live-bar', this.settings.get('channel.hide-not-live-bar'));
|
//this.toggleHide('not-live-bar', this.settings.get('channel.hide-not-live-bar'));
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
.support-panel > div:not(.scrollable-area) button:not(.tw-interactable):not(.tw-purchase-button),
|
||||||
|
button[data-test-selector="gift-subscribe-button"] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue