mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 10:06:54 +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",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.34.0",
|
"version": "4.34.1",
|
||||||
"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",
|
||||||
|
|
|
@ -219,7 +219,7 @@ export default class Input extends Module {
|
||||||
try {
|
try {
|
||||||
const above = t.chat.context.get('chat.actions.room-above'),
|
const above = t.chat.context.get('chat.actions.room-above'),
|
||||||
state = t.chat.context.get('context.chat_state') || {},
|
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 )
|
if ( ! container || ! container.props || ! container.props.children )
|
||||||
return out;
|
return out;
|
||||||
|
|
||||||
|
|
|
@ -362,7 +362,7 @@ export default class Layout extends Module {
|
||||||
let should_hide = false;
|
let should_hide = false;
|
||||||
if ( game && blocked_games.includes(game) )
|
if ( game && blocked_games.includes(game) )
|
||||||
should_hide = true;
|
should_hide = true;
|
||||||
if ( props.isPromoted && this.settings.get('directory.hide-promoted') )
|
if ( props?.isPromoted && this.settings.get('directory.hide-promoted') )
|
||||||
should_hide = true;
|
should_hide = true;
|
||||||
else {
|
else {
|
||||||
const regexes = this.settings.get('__filter:directory.block-titles');
|
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);
|
visited.add(frag);
|
||||||
|
|
||||||
if ( frag && frag.props && Array.isArray(frag.props.children) )
|
if ( frag && frag.props && frag.props.children ) {
|
||||||
for(const child of frag.props.children) {
|
if ( Array.isArray(frag.props.children) ) {
|
||||||
if ( ! child )
|
for(const child of frag.props.children) {
|
||||||
continue;
|
if ( ! child )
|
||||||
|
continue;
|
||||||
|
|
||||||
if ( Array.isArray(child) ) {
|
if ( Array.isArray(child) ) {
|
||||||
for(const f of child) {
|
for(const f of child) {
|
||||||
const out = findReactFragment(f, criteria, depth, current + 1, visited);
|
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 )
|
if ( out )
|
||||||
return 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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue