mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
4.77.5
* Fixed: Various player-related features not working correctly after Twitch's Friday update. Closes #1685 * Fixed: The current category not being detected correctly when viewing a channel. * Fixed: The setting to hide bits not hiding the get bits button from the top navigation bar.
This commit is contained in:
parent
a364ca45cb
commit
8ff9b9650a
3 changed files with 27 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.77.4",
|
"version": "4.77.5",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
@ -1964,14 +1964,17 @@ export default class PlayerBase extends Module {
|
||||||
{tip = (<div class="ffz-il-tooltip ffz-il-tooltip--align-right ffz-il-tooltip--up" role="tooltip" />)}
|
{tip = (<div class="ffz-il-tooltip ffz-il-tooltip--align-right ffz-il-tooltip--up" role="tooltip" />)}
|
||||||
</div>);
|
</div>);
|
||||||
|
|
||||||
const thing = container.querySelector('button[data-a-target="player-theatre-mode-button"]') ||
|
let thing = container.querySelector('button[data-a-target="player-theatre-mode-button"]') ||
|
||||||
//container.querySelector('div:not(:has(.tw-tooltip)) button:not([data-a-target])') ||
|
//container.querySelector('div:not(:has(.tw-tooltip)) button:not([data-a-target])') ||
|
||||||
container.querySelector('button[aria-label*="Theat"]') ||
|
container.querySelector('button[aria-label*="Theat"]') ||
|
||||||
container.querySelector('button[data-a-target="player-fullscreen-button"]');
|
container.querySelector('button[data-a-target="player-fullscreen-button"]');
|
||||||
|
|
||||||
if ( thing ) {
|
while(thing?.parentElement && thing.parentElement !== container)
|
||||||
container.insertBefore(cont, thing.parentElement);
|
thing = thing.parentElement;
|
||||||
} else
|
|
||||||
|
if ( thing?.parentElement === container )
|
||||||
|
container.insertBefore(cont, thing);
|
||||||
|
else
|
||||||
container.appendChild(cont);
|
container.appendChild(cont);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -2077,16 +2080,19 @@ export default class PlayerBase extends Module {
|
||||||
{tip = (<div class="ffz-il-tooltip ffz-il-tooltip--align-right ffz-il-tooltip--up" role="tooltip" />)}
|
{tip = (<div class="ffz-il-tooltip ffz-il-tooltip--align-right ffz-il-tooltip--up" role="tooltip" />)}
|
||||||
</div>);
|
</div>);
|
||||||
|
|
||||||
const thing = container.querySelector('.ffz--player-reset button') ||
|
let thing = container.querySelector('.ffz--player-reset button') ||
|
||||||
container.querySelector('.ffz--player-pip button') ||
|
container.querySelector('.ffz--player-pip button') ||
|
||||||
container.querySelector('button[data-a-target="player-theatre-mode-button"]') ||
|
container.querySelector('button[data-a-target="player-theatre-mode-button"]') ||
|
||||||
//container.querySelector('div:not(:has(.tw-tooltip)) button:not([data-a-target])') ||
|
//container.querySelector('div:not(:has(.tw-tooltip)) button:not([data-a-target])') ||
|
||||||
container.querySelector('button[aria-label*="Theat"]') ||
|
container.querySelector('button[aria-label*="Theat"]') ||
|
||||||
container.querySelector('button[data-a-target="player-fullscreen-button"]');
|
container.querySelector('button[data-a-target="player-fullscreen-button"]');
|
||||||
|
|
||||||
if ( thing ) {
|
while(thing?.parentElement && thing.parentElement !== container)
|
||||||
container.insertBefore(cont, thing.parentElement);
|
thing = thing.parentElement;
|
||||||
} else
|
|
||||||
|
if ( thing?.parentElement === container )
|
||||||
|
container.insertBefore(cont, thing);
|
||||||
|
else
|
||||||
container.appendChild(cont);
|
container.appendChild(cont);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -2112,11 +2118,6 @@ export default class PlayerBase extends Module {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
clickClip(inst, e) {
|
|
||||||
console.log('clicked clip', inst, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
addResetButton(inst, tries = 0) {
|
addResetButton(inst, tries = 0) {
|
||||||
const outer = inst.props.containerRef || this.fine.getChildNode(inst),
|
const outer = inst.props.containerRef || this.fine.getChildNode(inst),
|
||||||
container = outer && outer.querySelector(RIGHT_CONTROLS),
|
container = outer && outer.querySelector(RIGHT_CONTROLS),
|
||||||
|
@ -2157,15 +2158,18 @@ export default class PlayerBase extends Module {
|
||||||
{tip = (<div class="ffz-il-tooltip ffz-il-tooltip--align-right ffz-il-tooltip--up" role="tooltip" />)}
|
{tip = (<div class="ffz-il-tooltip ffz-il-tooltip--align-right ffz-il-tooltip--up" role="tooltip" />)}
|
||||||
</div>);
|
</div>);
|
||||||
|
|
||||||
const thing = container.querySelector('.ffz--player-pip button') ||
|
let thing = container.querySelector('.ffz--player-pip button') ||
|
||||||
container.querySelector('button[data-a-target="player-theatre-mode-button"]') ||
|
container.querySelector('button[data-a-target="player-theatre-mode-button"]') ||
|
||||||
//container.querySelector('div:not(:has(.tw-tooltip)) button:not([data-a-target])') ||
|
//container.querySelector('div:not(:has(.tw-tooltip)) button:not([data-a-target])') ||
|
||||||
container.querySelector('button[aria-label*="Theat"]') ||
|
container.querySelector('button[aria-label*="Theat"]') ||
|
||||||
container.querySelector('button[data-a-target="player-fullscreen-button"]');
|
container.querySelector('button[data-a-target="player-fullscreen-button"]');
|
||||||
|
|
||||||
if ( thing ) {
|
while(thing?.parentElement && thing.parentElement !== container)
|
||||||
container.insertBefore(cont, thing.parentElement);
|
thing = thing.parentElement;
|
||||||
} else
|
|
||||||
|
if ( thing?.parentElement === container )
|
||||||
|
container.insertBefore(cont, thing);
|
||||||
|
else
|
||||||
container.appendChild(cont);
|
container.appendChild(cont);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -308,7 +308,7 @@ export default class Channel extends Module {
|
||||||
let nvc = el.querySelector('.ffz--native-viewers-container');
|
let nvc = el.querySelector('.ffz--native-viewers-container');
|
||||||
if ( ! nvc ) {
|
if ( ! nvc ) {
|
||||||
let i = 0,
|
let i = 0,
|
||||||
vel = el.querySelector('p[data-a-target="animated-channel-viewers-count"]');
|
vel = el.querySelector('strong[data-a-target="animated-channel-viewers-count"]');
|
||||||
while(vel && vel != el && i < 5) {
|
while(vel && vel != el && i < 5) {
|
||||||
if ( vel.querySelector('svg') ) {
|
if ( vel.querySelector('svg') ) {
|
||||||
vel.classList.add('ffz--native-viewers-container');
|
vel.classList.add('ffz--native-viewers-container');
|
||||||
|
@ -406,7 +406,7 @@ export default class Channel extends Module {
|
||||||
channel = state?.memoizedState?.current?.result?.data?.user ??
|
channel = state?.memoizedState?.current?.result?.data?.user ??
|
||||||
state?.memoizedState?.current?.previousData?.user;
|
state?.memoizedState?.current?.previousData?.user;
|
||||||
|
|
||||||
if ( !channel?.lastBroadcast?.game )
|
if ( !channel?.lastBroadcast || !channel?.stream?.game )
|
||||||
channel = null;
|
channel = null;
|
||||||
|
|
||||||
if ( ! channel )
|
if ( ! channel )
|
||||||
|
@ -416,12 +416,12 @@ export default class Channel extends Module {
|
||||||
return channel != null;
|
return channel != null;
|
||||||
});
|
});
|
||||||
|
|
||||||
const game = channel?.lastBroadcast?.game,
|
const game = channel?.stream?.game,
|
||||||
title = channel?.lastBroadcast?.title;
|
title = channel?.lastBroadcast?.title;
|
||||||
|
|
||||||
if (game?.id !== el._ffz_game_cache || title !== el._ffz_title_cache)
|
if (game?.id !== el._ffz_game_cache || title !== el._ffz_title_cache)
|
||||||
this.settings.updateContext({
|
this.settings.updateContext({
|
||||||
category: game?.displayName,
|
category: game?.name,
|
||||||
categoryID: game?.id,
|
categoryID: game?.id,
|
||||||
title
|
title
|
||||||
});
|
});
|
||||||
|
@ -513,7 +513,7 @@ export default class Channel extends Module {
|
||||||
},*/
|
},*/
|
||||||
el,
|
el,
|
||||||
getViewerCount: () => {
|
getViewerCount: () => {
|
||||||
const thing = cont.querySelector('p[data-a-target="animated-channel-viewers-count"]'),
|
const thing = cont.querySelector('strong[data-a-target="animated-channel-viewers-count"]'),
|
||||||
r = thing && this.fine.getReactInstance(thing),
|
r = thing && this.fine.getReactInstance(thing),
|
||||||
c = r?.memoizedProps?.children;
|
c = r?.memoizedProps?.children;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue