Skip to content

Commit a52c015

Browse files
feat(YouTube - Hide layout components): Add "Hide Hype points" (#6230)
1 parent cd9ef81 commit a52c015

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public DescriptionComponentsFilter() {
6363
"how_this_was_made_section"
6464
);
6565

66+
final StringFilterGroup hypePoints = new StringFilterGroup(
67+
Settings.HIDE_HYPE_POINTS,
68+
"hype_points_factoid"
69+
);
70+
6671
macroMarkersCarousel = new StringFilterGroup(
6772
null,
6873
"macro_markers_carousel.e"
@@ -96,6 +101,7 @@ public DescriptionComponentsFilter() {
96101
infoCardsSection,
97102
horizontalShelf,
98103
howThisWasMadeSection,
104+
hypePoints,
99105
macroMarkersCarousel,
100106
podcastSection,
101107
transcriptSection

extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public class Settings extends BaseSettings {
211211
public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE);
212212
public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE);
213213
public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("revanced_hide_how_this_was_made_section", FALSE);
214+
public static final BooleanSetting HIDE_HYPE_POINTS = new BooleanSetting("revanced_hide_hype_points", FALSE);
214215
public static final BooleanSetting HIDE_INFO_CARDS_SECTION = new BooleanSetting("revanced_hide_info_cards_section", TRUE);
215216
public static final BooleanSetting HIDE_KEY_CONCEPTS_SECTION = new BooleanSetting("revanced_hide_key_concepts_section", FALSE);
216217
public static final BooleanSetting HIDE_PODCAST_SECTION = new BooleanSetting("revanced_hide_podcast_section", TRUE);

patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
147147
SwitchPreference("revanced_hide_chapters_section"),
148148
SwitchPreference("revanced_hide_info_cards_section"),
149149
SwitchPreference("revanced_hide_how_this_was_made_section"),
150+
SwitchPreference("revanced_hide_hype_points"),
150151
SwitchPreference("revanced_hide_key_concepts_section"),
151152
SwitchPreference("revanced_hide_podcast_section"),
152153
SwitchPreference("revanced_hide_transcript_section"),

patches/src/main/resources/addresources/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ If a Doodle is currently showing in your region and this hide setting is on, the
388388
<string name="revanced_hide_how_this_was_made_section_title">Hide \'How this content was made\'</string>
389389
<string name="revanced_hide_how_this_was_made_section_summary_on">How this content was made section is hidden</string>
390390
<string name="revanced_hide_how_this_was_made_section_summary_off">How this content was made section is shown</string>
391+
<string name="revanced_hide_hype_points_title">Hide Hype points</string>
392+
<string name="revanced_hide_hype_points_summary_on">Hype points are hidden</string>
393+
<string name="revanced_hide_hype_points_summary_off">Hype points are shown</string>
391394
<string name="revanced_hide_podcast_section_title">Hide \'Explore the podcast\'</string>
392395
<string name="revanced_hide_podcast_section_summary_on">Explore the podcast section is hidden</string>
393396
<string name="revanced_hide_podcast_section_summary_off">Explore the podcast section is shown</string>

0 commit comments

Comments
 (0)