1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 18:26:57 +00:00
* Added: Setting to hide the 'Open Mod View' button from chat.
* Fixed: Theater metadata appearing off-screen when navigating from a channel's landing page.
* Fixed: Whispers not appearing at all when the option to not display whispers in theater mode is enabled.
* Fixed: Reset Player causing the playback position of non-live content to reset to zero.
This commit is contained in:
SirStendec 2020-07-02 18:19:41 -04:00
parent b11e4edf2b
commit 50378bb3dc
7 changed files with 35 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{
"name": "frankerfacez",
"author": "Dan Salvato LLC",
"version": "4.20.3",
"version": "4.20.4",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0",
"scripts": {

View file

@ -504,6 +504,15 @@ export default class ChatHook extends Module {
]
}
});
this.settings.add('chat.input.show-mod-view', {
default: true,
ui: {
path: 'Chat > Input >> Appearance',
title: 'Display the Mod View button in relevant channels.',
component: 'setting-check-box'
}
});
}
get currentChat() {
@ -700,6 +709,8 @@ export default class ChatHook extends Module {
this.CalloutSelector.forceUpdate();
}, this);
this.chat.context.on('changed:chat.input.show-mod-view', val => this.css_tweaks.toggleHide('mod-view', ! val));
this.css_tweaks.toggleHide('mod-view', ! this.chat.context.get('chat.input.show-mod-view'));
this.chat.context.on('changed:chat.lines.alternate', val => {
this.css_tweaks.toggle('chat-rows', val);

View file

@ -38,7 +38,8 @@ const CLASSES = {
'profile-hover': '.preview-card .tw-relative:hover .ffz-channel-avatar',
'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]',
'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator',
'celebration': 'body .celebration__overlay'
'celebration': 'body .celebration__overlay',
'mod-view': '.chat-input__buttons-container .tw-core-button[href*="/moderator"]'
};

View file

@ -0,0 +1,4 @@
.toggle-visibility__right-column--expanded,
.channel-root__right-column {
transition: none !important;
}

View file

@ -19,6 +19,10 @@
}
}
.channel-root > div > div {
transform: none !important;
}
&:hover {
.channel-info-content > div:first-child,
.channel-info-bar {

View file

@ -3,4 +3,4 @@
bottom: 0 !important;
}
.whispers-open-threads.whispers--theatre-mode { display: none !important }
.channel-root__scroll-area--theatre-mode + div + .whispers-open-threads.whispers--theatre-mode { display: none !important }

View file

@ -1015,6 +1015,8 @@ export default class Player extends Module {
if ( inst._ffzUpdateVolume )
inst._ffzUpdateVolume();
this.emit(':update-gui', inst);
}
@ -1468,6 +1470,13 @@ export default class Player extends Module {
}
}
// Are we dealing with a VOD?
const duration = player.getDuration?.() ?? Infinity;
let position = -1;
if ( isFinite(duration) && ! isNaN(duration) && duration > 0 )
position = player.getPosition();
const video = player.mediaSinkManager?.video || player.core?.mediaSinkManager?.video;
if ( video?._ffz_compressor && player.attachHTMLVideoElement ) {
const new_vid = createElement('video'),
@ -1491,6 +1500,9 @@ export default class Player extends Module {
if ( ! player || player === inst.props?.mediaPlayerInstance )
inst.setSrc({isNewMediaPlayerInstance: false});
}
if ( position > 0 )
setTimeout(() => player.seekTo(position), 250);
}