From fe66baedb7803e33cc633c515a3804cd266cc293 Mon Sep 17 00:00:00 2001
From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Date: Sat, 16 Aug 2025 11:45:36 -0400
Subject: [PATCH] feat(YouTube - Hide video action buttons): Add "Hide Hype
button" setting
---
.../youtube/patches/components/ButtonsFilter.java | 4 ++++
.../revanced/extension/youtube/settings/Settings.java | 1 +
.../youtube/layout/buttons/action/HideButtonsPatch.kt | 1 +
.../src/main/resources/addresources/values/strings.xml | 9 +++++++--
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/ButtonsFilter.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/ButtonsFilter.java
index 42e428fe9..775286517 100644
--- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/ButtonsFilter.java
+++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/ButtonsFilter.java
@@ -83,6 +83,10 @@ final class ButtonsFilter extends Filter {
new ByteArrayFilterGroup(
Settings.HIDE_CLIP_BUTTON,
"yt_outline_scissors"
+ ),
+ new ByteArrayFilterGroup(
+ Settings.HIDE_HYPE_BUTTON,
+ "yt_outline_star_shooting"
)
);
}
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 c9be65624..16ba32358 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
@@ -223,6 +223,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_ASK_BUTTON = new BooleanSetting("revanced_hide_ask_button", FALSE);
public static final BooleanSetting HIDE_CLIP_BUTTON = new BooleanSetting("revanced_hide_clip_button", TRUE);
public static final BooleanSetting HIDE_DOWNLOAD_BUTTON = new BooleanSetting("revanced_hide_download_button", FALSE);
+ public static final BooleanSetting HIDE_HYPE_BUTTON = new BooleanSetting("revanced_hide_hype_button", FALSE);
public static final BooleanSetting HIDE_LIKE_DISLIKE_BUTTON = new BooleanSetting("revanced_hide_like_dislike_button", FALSE);
public static final BooleanSetting HIDE_REMIX_BUTTON = new BooleanSetting("revanced_hide_remix_button", TRUE);
public static final BooleanSetting HIDE_REPORT_BUTTON = new BooleanSetting("revanced_hide_report_button", FALSE);
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt
index 667bf1608..266e2a97e 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt
@@ -49,6 +49,7 @@ val hideButtonsPatch = resourcePatch(
SwitchPreference("revanced_hide_share_button"),
SwitchPreference("revanced_hide_stop_ads_button"),
SwitchPreference("revanced_hide_thanks_button"),
+ SwitchPreference("revanced_hide_hype_button"),
)
)
)
diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml
index 8e5377d27..5beb0d965 100644
--- a/patches/src/main/resources/addresources/values/strings.xml
+++ b/patches/src/main/resources/addresources/values/strings.xml
@@ -631,7 +631,7 @@ Adjust volume by swiping vertically on the right side of the screen"
Stop ads button is hidden
Stop ads button is shown
+ This button usually only shows on live streams. -->
Hide Report
Report button is hidden
Report button is shown
@@ -643,12 +643,17 @@ Adjust volume by swiping vertically on the right side of the screen"
Hide Download
Download button is hidden
Download button is shown
+
+ Hide Hype button
+ Hype button is hidden.
+ Hype button is shown.
Hide Thanks
Thanks button is hidden
Thanks button is shown
+ This button only shows if the user ip is from specific region such as the USA or EU. -->
Hide Ask
Ask button is hidden
Ask button is shown