mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
4.34.1
* Fixed: Room actions not rendering due to changes in React internals. * Fixed: Bug with sidebar cards not being hidden correctly in some situations.
This commit is contained in:
parent
bcee12a6b3
commit
4d1d3ae0d2
4 changed files with 21 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "frankerfacez",
|
||||
"author": "Dan Salvato LLC",
|
||||
"version": "4.34.0",
|
||||
"version": "4.34.1",
|
||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
@ -219,7 +219,7 @@ export default class Input extends Module {
|
|||
try {
|
||||
const above = t.chat.context.get('chat.actions.room-above'),
|
||||
state = t.chat.context.get('context.chat_state') || {},
|
||||
container = above ? out : findReactFragment(out, n => n.props && n.props.className === 'chat-input__buttons-container');
|
||||
container = above ? findReactFragment(out, n => n.props && Array.isArray(n.props.children)) : findReactFragment(out, n => n.props && n.props.className === 'chat-input__buttons-container');
|
||||
if ( ! container || ! container.props || ! container.props.children )
|
||||
return out;
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ export default class Layout extends Module {
|
|||
let should_hide = false;
|
||||
if ( game && blocked_games.includes(game) )
|
||||
should_hide = true;
|
||||
if ( props.isPromoted && this.settings.get('directory.hide-promoted') )
|
||||
if ( props?.isPromoted && this.settings.get('directory.hide-promoted') )
|
||||
should_hide = true;
|
||||
else {
|
||||
const regexes = this.settings.get('__filter:directory.block-titles');
|
||||
|
|
|
@ -58,23 +58,30 @@ export function findReactFragment(frag, criteria, depth = 25, current = 0, visit
|
|||
|
||||
visited.add(frag);
|
||||
|
||||
if ( frag && frag.props && Array.isArray(frag.props.children) )
|
||||
for(const child of frag.props.children) {
|
||||
if ( ! child )
|
||||
continue;
|
||||
if ( frag && frag.props && frag.props.children ) {
|
||||
if ( Array.isArray(frag.props.children) ) {
|
||||
for(const child of frag.props.children) {
|
||||
if ( ! child )
|
||||
continue;
|
||||
|
||||
if ( Array.isArray(child) ) {
|
||||
for(const f of child) {
|
||||
const out = findReactFragment(f, criteria, depth, current + 1, visited);
|
||||
if ( Array.isArray(child) ) {
|
||||
for(const f of child) {
|
||||
const out = findReactFragment(f, criteria, depth, current + 1, visited);
|
||||
if ( out )
|
||||
return out;
|
||||
}
|
||||
} else {
|
||||
const out = findReactFragment(child, criteria, depth, current + 1, visited);
|
||||
if ( out )
|
||||
return out;
|
||||
}
|
||||
} else {
|
||||
const out = findReactFragment(child, criteria, depth, current + 1, visited);
|
||||
if ( out )
|
||||
return out;
|
||||
}
|
||||
} else {
|
||||
const out = findReactFragment(frag.props.children, criteria, depth, current + 1, visited);
|
||||
if ( out )
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue