Skip to content

Commit 5821440

Browse files
fix(YouTube - Hide layout components): Fix "Hide Hype points" (#6247)
1 parent d80892c commit 5821440

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ final class DescriptionComponentsFilter extends Filter {
1717
private final ByteArrayFilterGroup cellVideoAttribute;
1818

1919
private final StringFilterGroup aiGeneratedVideoSummarySection;
20+
private final StringFilterGroup hypePoints;
2021

2122
public DescriptionComponentsFilter() {
2223
exceptions.addPatterns(
@@ -63,7 +64,7 @@ public DescriptionComponentsFilter() {
6364
"how_this_was_made_section"
6465
);
6566

66-
final StringFilterGroup hypePoints = new StringFilterGroup(
67+
hypePoints = new StringFilterGroup(
6768
Settings.HIDE_HYPE_POINTS,
6869
"hype_points_factoid"
6970
);
@@ -112,7 +113,7 @@ public DescriptionComponentsFilter() {
112113
boolean isFiltered(String identifier, String path, byte[] buffer,
113114
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
114115

115-
if (matchedGroup == aiGeneratedVideoSummarySection) {
116+
if (matchedGroup == aiGeneratedVideoSummarySection || matchedGroup == hypePoints) {
116117
// Only hide if player is open, in case this component is used somewhere else.
117118
return PlayerType.getCurrent().isMaximizedOrFullscreen();
118119
}

0 commit comments

Comments
 (0)