Skip to content

Commit a84db7b

Browse files
feat(YouTube - Hide video action buttons): Add "Hide Shop button" setting
1 parent 2520129 commit a84db7b

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public ButtonsFilter() {
7474
Settings.HIDE_ASK_BUTTON,
7575
"yt_fill_spark"
7676
),
77+
new ByteArrayFilterGroup(
78+
Settings.HIDE_SHOP_BUTTON,
79+
"yt_outline_bag"
80+
),
7781
new ByteArrayFilterGroup(
7882
Settings.HIDE_STOP_ADS_BUTTON,
7983
"yt_outline_slash_circle_left"

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
@@ -230,6 +230,7 @@ public class Settings extends BaseSettings {
230230
public static final BooleanSetting HIDE_REPORT_BUTTON = new BooleanSetting("revanced_hide_report_button", FALSE);
231231
public static final BooleanSetting HIDE_SAVE_BUTTON = new BooleanSetting("revanced_hide_save_button", FALSE);
232232
public static final BooleanSetting HIDE_SHARE_BUTTON = new BooleanSetting("revanced_hide_share_button", FALSE);
233+
public static final BooleanSetting HIDE_SHOP_BUTTON = new BooleanSetting("revanced_hide_shop_button", FALSE);
233234
public static final BooleanSetting HIDE_STOP_ADS_BUTTON = new BooleanSetting("revanced_hide_stop_ads_button", TRUE);
234235
public static final BooleanSetting HIDE_THANKS_BUTTON = new BooleanSetting("revanced_hide_thanks_button", TRUE);
235236

patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ val hideButtonsPatch = resourcePatch(
4949
SwitchPreference("revanced_hide_report_button"),
5050
SwitchPreference("revanced_hide_save_button"),
5151
SwitchPreference("revanced_hide_share_button"),
52+
SwitchPreference("revanced_hide_shop_button"),
5253
SwitchPreference("revanced_hide_stop_ads_button"),
5354
SwitchPreference("revanced_hide_thanks_button"),
5455
)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ Adjust volume by swiping vertically on the right side of the screen"</string>
684684
<string name="revanced_hide_clip_button_title">Hide Clip</string>
685685
<string name="revanced_hide_clip_button_summary_on">Clip button is hidden</string>
686686
<string name="revanced_hide_clip_button_summary_off">Clip button is shown</string>
687+
<!-- 'Shop' should be translated with the same localized wording that YouTube displays. -->
688+
<string name="revanced_hide_shop_button_title">Hide Shop</string>
689+
<string name="revanced_hide_shop_button_summary_on">Shop button is hidden</string>
690+
<string name="revanced_hide_shop_button_summary_off">Shop button is shown</string>
687691
<!-- 'Save' should be translated with the same localized wording that YouTube displays. -->
688692
<string name="revanced_hide_save_button_title">Hide Save</string>
689693
<string name="revanced_hide_save_button_summary_on">Save button is hidden</string>

0 commit comments

Comments
 (0)