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

Add setting to hide live notification when watching a clip / video (#608)

* Add setting to hide live notification when watching a clip / video
* Also move Event, Rerun and Squad Streaming Bar settings from the Player to the Channel section
This commit is contained in:
Lordmau5 2019-06-08 23:26:50 +02:00 committed by Mike
parent 17abc10f7c
commit 3157aeb390
2 changed files with 15 additions and 3 deletions

View file

@ -31,6 +31,7 @@ const CLASSES = {
'dir-live-ind': '.live-channel-card:not([data-a-target*="host"]) .stream-type-indicator.stream-type-indicator--live,.stream-thumbnail__card .stream-type-indicator.stream-type-indicator--live,.preview-card .stream-type-indicator.stream-type-indicator--live,.preview-card .preview-card-stat.preview-card-stat--live',
'profile-hover': '.preview-card .tw-relative:hover .ffz-channel-avatar',
'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]',
};
@ -228,6 +229,16 @@ export default class CSSTweaks extends Module {
},
changed: val => this.toggle('square-avatars', !val)
});
this.settings.add('channel.not-live-bar', {
default: true,
ui: {
path: 'Channel > Appearance >> General',
title: 'Show notification below clips and videos if the streamer is live.',
component: 'setting-check-box'
},
changed: val => this.toggle('not-live-bar', !val)
});
}
onEnable() {
@ -243,6 +254,7 @@ export default class CSSTweaks extends Module {
this.toggleHide('top-discover', !this.settings.get('layout.discover'));
this.toggle('square-avatars', ! this.settings.get('channel.round-avatars'));
this.toggleHide('not-live-bar', ! this.settings.get('channel.not-live-bar'));
const recs = this.settings.get('layout.side-nav.show-rec-channels');
this.toggleHide('side-rec-channels', recs === 0);

View file

@ -254,7 +254,7 @@ export default class Player extends Module {
this.settings.add('player.hide-event-bar', {
default: false,
ui: {
path: 'Player > General >> General',
path: 'Channel > Appearance >> General',
title: 'Hide the Event Bar',
description: 'Hide the Event Bar which appears above the player when there is an ongoing event for the current channel.',
component: 'setting-check-box'
@ -268,7 +268,7 @@ export default class Player extends Module {
this.settings.add('player.hide-rerun-bar', {
default: false,
ui: {
path: 'Player > General >> General',
path: 'Channel > Appearance >> General',
title: 'Hide the Rerun Bar',
description: 'Hide the Rerun Bar which appears above the player when the current channel is playing a video rather than live content.',
component: 'setting-check-box'
@ -282,7 +282,7 @@ export default class Player extends Module {
this.settings.add('player.hide-squad-banner', {
default: false,
ui: {
path: 'Player > General >> General',
path: 'Channel > Appearance >> General',
title: 'Hide the Squad Streaming Bar',
component: 'setting-check-box'
},