1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-04 11:44:00 +00:00
* Added: Option to hide channels from the directory based on their title.
* Fixed: Issue with FrankerFaceZ failing to initialize correctly due to a change in Twitch's JS layout.
This commit is contained in:
SirStendec 2022-06-08 23:07:07 -04:00
parent 213c2195cc
commit bcee12a6b3
8 changed files with 158 additions and 25 deletions

View file

@ -359,9 +359,24 @@ export default class Layout extends Module {
game = stream?.game?.displayName,
offline = props?.offline ?? false;
let should_hide = false;
if ( game && blocked_games.includes(game) )
should_hide = true;
if ( props.isPromoted && this.settings.get('directory.hide-promoted') )
should_hide = true;
else {
const regexes = this.settings.get('__filter:directory.block-titles');
const title = stream?.broadcaster?.broadcastSettings?.title;
if ( regexes && title &&
(( regexes[0] && regexes[0].test(title) ) ||
( regexes[1] && regexes[1].test(title) ))
)
should_hide = true;
}
card.classList.toggle('ffz--side-nav-card-rerun', rerun);
card.classList.toggle('ffz--side-nav-card-offline', offline);
card.classList.toggle('tw-hide', game ? blocked_games.includes(game) : false);
card.classList.toggle('tw-hide', should_hide);
}
}