mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
feat(YouTube - Hide video action buttons): Add Hide Stop ads (#5245)
This commit is contained in:
committed by
GitHub
parent
674a5b8d29
commit
0e63f49e13
@@ -46,7 +46,7 @@ final class ButtonsFilter extends Filter {
|
||||
"|download_button.eml"
|
||||
),
|
||||
new StringFilterGroup(
|
||||
Settings.HIDE_PLAYLIST_BUTTON,
|
||||
Settings.HIDE_SAVE_BUTTON,
|
||||
"|save_to_playlist_button"
|
||||
),
|
||||
new StringFilterGroup(
|
||||
@@ -76,6 +76,10 @@ final class ButtonsFilter extends Filter {
|
||||
Settings.HIDE_ASK_BUTTON,
|
||||
"yt_fill_spark"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_STOP_ADS_BUTTON,
|
||||
"yt_outline_slash_circle_left"
|
||||
),
|
||||
// Check for clip button both here and using a path filter,
|
||||
// as there's a chance the path is a generic action button and won't contain 'clip_button'
|
||||
new ByteArrayFilterGroup(
|
||||
|
||||
@@ -200,15 +200,16 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_TRANSCRIPT_SECTION = new BooleanSetting("revanced_hide_transcript_section", TRUE);
|
||||
// Action buttons
|
||||
public static final BooleanSetting DISABLE_LIKE_SUBSCRIBE_GLOW = new BooleanSetting("revanced_disable_like_subscribe_glow", FALSE);
|
||||
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_LIKE_DISLIKE_BUTTON = new BooleanSetting("revanced_hide_like_dislike_button", FALSE);
|
||||
public static final BooleanSetting HIDE_PLAYLIST_BUTTON = new BooleanSetting("revanced_hide_playlist_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);
|
||||
public static final BooleanSetting HIDE_SAVE_BUTTON = new BooleanSetting("revanced_hide_save_button", FALSE);
|
||||
public static final BooleanSetting HIDE_SHARE_BUTTON = new BooleanSetting("revanced_hide_share_button", FALSE);
|
||||
public static final BooleanSetting HIDE_STOP_ADS_BUTTON = new BooleanSetting("revanced_hide_stop_ads_button", TRUE);
|
||||
public static final BooleanSetting HIDE_THANKS_BUTTON = new BooleanSetting("revanced_hide_thanks_button", TRUE);
|
||||
public static final BooleanSetting HIDE_ASK_BUTTON = new BooleanSetting("revanced_hide_ask_button", FALSE);
|
||||
// Player flyout menu items
|
||||
public static final BooleanSetting HIDE_PLAYER_FLYOUT_ADDITIONAL_SETTINGS = new BooleanSetting("revanced_hide_player_flyout_additional_settings", FALSE);
|
||||
public static final BooleanSetting HIDE_PLAYER_FLYOUT_AMBIENT_MODE = new BooleanSetting("revanced_hide_player_flyout_ambient_mode", FALSE);
|
||||
|
||||
@@ -38,15 +38,16 @@ val hideButtonsPatch = resourcePatch(
|
||||
"revanced_hide_buttons_screen",
|
||||
preferences = setOf(
|
||||
SwitchPreference("revanced_disable_like_subscribe_glow"),
|
||||
SwitchPreference("revanced_hide_like_dislike_button"),
|
||||
SwitchPreference("revanced_hide_share_button"),
|
||||
SwitchPreference("revanced_hide_report_button"),
|
||||
SwitchPreference("revanced_hide_remix_button"),
|
||||
SwitchPreference("revanced_hide_download_button"),
|
||||
SwitchPreference("revanced_hide_thanks_button"),
|
||||
SwitchPreference("revanced_hide_ask_button"),
|
||||
SwitchPreference("revanced_hide_clip_button"),
|
||||
SwitchPreference("revanced_hide_playlist_button"),
|
||||
SwitchPreference("revanced_hide_download_button"),
|
||||
SwitchPreference("revanced_hide_like_dislike_button"),
|
||||
SwitchPreference("revanced_hide_remix_button"),
|
||||
SwitchPreference("revanced_hide_report_button"),
|
||||
SwitchPreference("revanced_hide_save_button"),
|
||||
SwitchPreference("revanced_hide_share_button"),
|
||||
SwitchPreference("revanced_hide_stop_ads_button"),
|
||||
SwitchPreference("revanced_hide_thanks_button"),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -595,6 +595,10 @@ Adjust volume by swiping vertically on the right side of the screen"</string>
|
||||
<string name="revanced_hide_share_button_title">Hide Share</string>
|
||||
<string name="revanced_hide_share_button_summary_on">Share button is hidden</string>
|
||||
<string name="revanced_hide_share_button_summary_off">Share button is shown</string>
|
||||
<!-- 'Stop ads' should be translated with the same localized wording that YouTube displays. -->
|
||||
<string name="revanced_hide_stop_ads_button_title">Hide Stop ads</string>
|
||||
<string name="revanced_hide_stop_ads_button_summary_on">Stop ads button is hidden</string>
|
||||
<string name="revanced_hide_stop_ads_button_summary_off">Stop ads button is shown</string>
|
||||
<!-- 'Report' should be translated with the same localized wording that YouTube displays.
|
||||
This button usually appears only on live streams. -->
|
||||
<string name="revanced_hide_report_button_title">Hide Report</string>
|
||||
@@ -622,9 +626,9 @@ Adjust volume by swiping vertically on the right side of the screen"</string>
|
||||
<string name="revanced_hide_clip_button_summary_on">Clip button is hidden</string>
|
||||
<string name="revanced_hide_clip_button_summary_off">Clip button is shown</string>
|
||||
<!-- 'Save' should be translated with the same localized wording that YouTube displays. -->
|
||||
<string name="revanced_hide_playlist_button_title">Hide Save to playlist</string>
|
||||
<string name="revanced_hide_playlist_button_summary_on">Save to playlist button is hidden</string>
|
||||
<string name="revanced_hide_playlist_button_summary_off">Save to playlist button is shown</string>
|
||||
<string name="revanced_hide_save_button_title">Hide Save</string>
|
||||
<string name="revanced_hide_save_button_summary_on">Save button is hidden</string>
|
||||
<string name="revanced_hide_save_button_summary_off">Save button is shown</string>
|
||||
</patch>
|
||||
<patch id="layout.buttons.navigation.navigationButtonsPatch">
|
||||
<string name="revanced_navigation_buttons_screen_title">Navigation buttons</string>
|
||||
|
||||
Reference in New Issue
Block a user