1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00
Second round of fixes. There are still some broken things, but with metadata and the FFZ Control Center pop-out repaired most features are working correctly.

* Fixed: Detection of the proper parent element for channel metadata.
* Fixed: Detection of the proper parent element for exclusive-mode dialogs.
This commit is contained in:
SirStendec 2021-05-17 17:35:40 -04:00
parent 89941d2ee5
commit 432ac86342
7 changed files with 21 additions and 10 deletions

View file

@ -1,7 +1,7 @@
{
"name": "frankerfacez",
"author": "Dan Salvato LLC",
"version": "4.22.6",
"version": "4.22.7",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"private": true,
"license": "Apache-2.0",

View file

@ -48,7 +48,7 @@ export default class ClipsSite extends BaseSite {
'player-gain-volume': '.video-player__overlay[data-compressed="true"] .volume-slider__slider-container:not(.ffz--player-gain)',
'player-ext': '.video-player .extension-taskbar,.video-player .extension-container,.video-player .extensions-dock__layout,.video-player .extensions-notifications,.video-player .extensions-video-overlay-size-container,.video-player .extensions-dock__layout',
'player-ext-hover': '.video-player__overlay[data-controls="false"] .extension-taskbar,.video-player__overlay[data-controls="false"] .extension-container,.video-player__overlay[data-controls="false"] .extensions-dock__layout,.video-player__overlay[data-controls="false"] .extensions-notifications,.video-player__overlay[data-controls="false"] .extensions-video-overlay-size-container',
'dark-toggle': 'div[data-a-target="dark-mode-toggle"],div[data-a-target="dark-mode-toggle"] + .tw-border-b'
'dark-toggle': 'div[data-a-target="dark-mode-toggle"],div[data-a-target="dark-mode-toggle"] + div'
};
this.inject(Player);

View file

@ -412,6 +412,6 @@ Twilight.ROUTES = {
};
Twilight.DIALOG_EXCLUSIVE = '.moderation-root,.sunlight-root,.twilight-main,.twilight-minimal-root>div,#root>div>.tw-full-height,.clips-root';
Twilight.DIALOG_EXCLUSIVE = '.moderation-root,.sunlight-root,.twilight-main,.twilight-minimal-root>div,#root>div>.tw-full-height,.clips-root,#root>div>div';
Twilight.DIALOG_MAXIMIZED = '.moderation-view-page > div[data-highlight-selector="main-grid"],.sunlight-page,.twilight-main,.twilight-minimal-root,#root .dashboard-side-nav+.tw-full-height,.clips-root>.tw-full-height .scrollable-area,.teams-page-body__outer-container .scrollable-area';
Twilight.DIALOG_SELECTOR = '.moderation-root,.sunlight-root,#root>div,.twilight-minimal-root>.tw-full-height,.clips-root>.tw-full-height .scrollable-area';

View file

@ -314,8 +314,14 @@ export default class Channel extends Module {
}
if ( ! el._ffz_cont ) {
const report = el.querySelector('.report-button,button[data-test-selector="video-options-button"],button[data-test-selector="clip-options-button"]'),
cont = report && (report.closest('.tw-flex-wrap.tw-justify-content-end') || report.closest('.tw-justify-content-end'));
const report = el.querySelector('.report-button,button[data-test-selector="video-options-button"],button[data-test-selector="clip-options-button"]');
let cont = report && (report.closest('.tw-flex-wrap.tw-justify-content-end') || report.closest('.tw-justify-content-end'));
if ( ! cont && report ) {
cont = report.parentElement?.parentElement;
if ( cont && cont.parentElement?.childElementCount === 2 )
cont = cont.parentElement.firstElementChild;
}
if ( cont && el.contains(cont) ) {
el._ffz_cont = cont;

View file

@ -2314,7 +2314,7 @@ export default class EmoteMenu extends Module {
whisper = this.props.source === 'whisper';
return (<div class={`tw-block${this.props.visible ? '' : ' tw-hide'}`} style={{display: this.props.visible ? null : 'none !important'}}>
<div class="tw-absolute tw-attached tw-attached--right tw-attached--up">
<div class="tw-absolute ffz-attached ffz-attached--right ffz-attached--up">
<div
class={`ffz-balloon ffz-balloon--auto tw-inline-block tw-border-radius-large tw-c-background-base tw-c-text-inherit tw-elevation-2 ffz--emote-picker${this.state.tall ? ' ffz--emote-picker__tall' : ''}${padding ? ' reduced-padding' : ''}`}
data-a-target="emote-picker"

View file

@ -732,7 +732,7 @@ export default class MenuButton extends SiteModule {
}
ctx = (<div class={`tw-absolute tw-attached ${is_mod ? 'tw-attached--up tw-attached--left' : 'tw-attached--down tw-attached--right'}`}>
ctx = (<div class={`tw-absolute ffz-attached ${is_mod ? 'ffz-attached--up ffz-attached--left' : 'ffz-attached--down ffz-attached--right'}`}>
<div class={`ffz-balloon ffz-balloon--lg tw-block ffz--menu-context`}>
<div class="tw-border-radius-large tw-c-background-base tw-c-text-inherit tw-elevation-4">
<div class="tw-c-text-base tw-elevation-1 tw-flex tw-flex-shrink-0 tw-pd-x-1 tw-pd-y-05 tw-popover-header">

View file

@ -164,7 +164,7 @@
&--xl { width: 50rem }
}
.tw-attached {
.ffz-attached {
position: absolute;
z-index: var(--z-index-balloon);
@ -173,7 +173,12 @@
&--left { margin-right: 0 }
&--right { margin-left: 0 }
&--up.tw-attached--right {
/*&--up.tw-attached--right {
inset: auto 0px 100% auto;
}
}*/
&--right { right: 0 }
&--left { left: 0 }
&--up { bottom: 100% }
&--down { top: 100% }
}