1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 05:15:54 +00:00

Fix tool-tip placement. Fix incorrect player width in theater mode with collapsed chat and a custom chat width set. Fix channel bar placement with minimize navigation. Fix player size when entering fullscreen with theater mode enabled. Fix minor bug in has method.

This commit is contained in:
SirStendec 2017-12-21 20:37:58 -05:00
parent 160dd98062
commit be9de6de25
7 changed files with 44 additions and 9 deletions

View file

@ -1,3 +1,11 @@
<div class="list-header">4.0.0-beta1.5<span>@9a60ce1ee6c58905c6eb</span> <time datetime="2017-12-13">(2017-12-13)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Player not covering the whole window in theater mode with a custom chat width and chat collapsed.</li>
<li>Fixed: Player not covering the whole screen when you enter fullscreen from theater mode. (Twitch Bug)</li>
<li>Fixed: Position of channel bar with Minimize Navigation is enabled.</li>
<li>Fixed: Tooltip placement.</li>
</ul>
<div class="list-header">4.0.0-beta1.5<span>@764c7c372c158220ed04</span> <time datetime="2017-12-13">(2017-12-13)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Directory stuff breaking.</li>

View file

@ -401,14 +401,27 @@ export default class Metadata extends Module {
container.appendChild(el);
if ( def.tooltip )
if ( def.tooltip ) {
const parent = document.body.querySelector('.twilight-root') || document.body;
el.tooltip = new Tooltip(container, el, {
live: false,
html: true,
content: () => el.tip_content,
onShow: (t, tip) => el.tip = tip,
onHide: () => el.tip = null
onHide: () => el.tip = null,
popper: {
placement: 'bottom',
modifiers: {
flip: {
behavior: ['bottom', 'top']
},
preventOverflow: {
boundariesElement: parent
}
}
}
});
}
} else {
stat = el.querySelector('.ffz-stat-text');

View file

@ -30,9 +30,15 @@ export default class TooltipProvider extends Module {
}, target.dataset.data)
]
}
this.types.html = target => {
return target.dataset.title;
}
}
onEnable() {
const container = document.body.querySelector('.twilight-root') || document.body;
this.tips = new Tooltip('body [data-reactroot]', 'ffz-tooltip', {
html: true,
delayHide: this.checkDelayHide.bind(this),
@ -40,7 +46,15 @@ export default class TooltipProvider extends Module {
content: this.process.bind(this),
interactive: this.checkInteractive.bind(this),
popper: {
placement: 'top'
placement: 'top',
modifiers: {
flip: {
behavior: ['top', 'bottom', 'left', 'right']
},
preventOverflow: {
boundariesElement: container
}
}
}
});
}

View file

@ -2,7 +2,7 @@ body .whispers--theatre-mode.whispers--right-column-expanded {
right: var(--ffz-chat-width);
}
body .persistent-player--theatre,
body .persistent-player--theatre:not([style*="width: 100%"]),
body .channel-page__video-player--theatre-mode {
width: calc(100% - var(--ffz-chat-width)) !important;
}

View file

@ -20,8 +20,4 @@
}
}
}
.channel-header {
top: -4rem;
}
}

View file

@ -11,3 +11,7 @@
bottom: 4rem;
height: auto;
}
.video-player--fullscreen.video-player--theatre.video-player--logged-in .video-player__container {
bottom: 0 !important;
}

View file

@ -3,7 +3,7 @@
const HOP = Object.prototype.hasOwnProperty;
export function has(object, key) {
return HOP.call(object, key);
return object ? HOP.call(object, key) : false;
}