From a52c0153b12c3f6f0ad260e03d2e9850c0466392 Mon Sep 17 00:00:00 2001
From: ILoveOpenSourceApplications
<117499019+ILoveOpenSourceApplications@users.noreply.github.com>
Date: Tue, 4 Nov 2025 12:35:28 +0530
Subject: [PATCH] feat(YouTube - Hide layout components): Add "Hide Hype
points" (#6230)
---
.../patches/components/DescriptionComponentsFilter.java | 6 ++++++
.../app/revanced/extension/youtube/settings/Settings.java | 1 +
.../layout/hide/general/HideLayoutComponentsPatch.kt | 1 +
patches/src/main/resources/addresources/values/strings.xml | 3 +++
4 files changed, 11 insertions(+)
diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java
index 0d727bcfd..42831e519 100644
--- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java
+++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java
@@ -63,6 +63,11 @@ final class DescriptionComponentsFilter extends Filter {
"how_this_was_made_section"
);
+ final StringFilterGroup hypePoints = new StringFilterGroup(
+ Settings.HIDE_HYPE_POINTS,
+ "hype_points_factoid"
+ );
+
macroMarkersCarousel = new StringFilterGroup(
null,
"macro_markers_carousel.e"
@@ -96,6 +101,7 @@ final class DescriptionComponentsFilter extends Filter {
infoCardsSection,
horizontalShelf,
howThisWasMadeSection,
+ hypePoints,
macroMarkersCarousel,
podcastSection,
transcriptSection
diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
index 0dd82d240..2c4c2aa4d 100644
--- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
+++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
@@ -211,6 +211,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE);
public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE);
public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("revanced_hide_how_this_was_made_section", FALSE);
+ public static final BooleanSetting HIDE_HYPE_POINTS = new BooleanSetting("revanced_hide_hype_points", FALSE);
public static final BooleanSetting HIDE_INFO_CARDS_SECTION = new BooleanSetting("revanced_hide_info_cards_section", TRUE);
public static final BooleanSetting HIDE_KEY_CONCEPTS_SECTION = new BooleanSetting("revanced_hide_key_concepts_section", FALSE);
public static final BooleanSetting HIDE_PODCAST_SECTION = new BooleanSetting("revanced_hide_podcast_section", TRUE);
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
index 2c03809b2..e54b7f1ee 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
@@ -147,6 +147,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
SwitchPreference("revanced_hide_chapters_section"),
SwitchPreference("revanced_hide_info_cards_section"),
SwitchPreference("revanced_hide_how_this_was_made_section"),
+ SwitchPreference("revanced_hide_hype_points"),
SwitchPreference("revanced_hide_key_concepts_section"),
SwitchPreference("revanced_hide_podcast_section"),
SwitchPreference("revanced_hide_transcript_section"),
diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml
index d644d34a2..d2f5512de 100644
--- a/patches/src/main/resources/addresources/values/strings.xml
+++ b/patches/src/main/resources/addresources/values/strings.xml
@@ -388,6 +388,9 @@ If a Doodle is currently showing in your region and this hide setting is on, the
Hide \'How this content was made\'
How this content was made section is hidden
How this content was made section is shown
+ Hide Hype points
+ Hype points are hidden
+ Hype points are shown
Hide \'Explore the podcast\'
Explore the podcast section is hidden
Explore the podcast section is shown