Skip to content

Commit ac6b916

Browse files
feat(YouTube - Hide Shorts components): Add hide 'New posts' button
1 parent 0d26748 commit ac6b916

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ public ShortsFilter() {
267267
Settings.HIDE_SHORTS_GREEN_SCREEN_BUTTON,
268268
"greenscreen_temp"
269269
),
270+
new ByteArrayFilterGroup(
271+
Settings.HIDE_SHORTS_NEW_POSTS_BUTTON,
272+
"yt_outline_box_pencil"
273+
),
270274
new ByteArrayFilterGroup(
271275
Settings.HIDE_SHORTS_HASHTAG_BUTTON,
272276
"yt_outline_hashtag_"

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
@@ -262,6 +262,7 @@ public class Settings extends BaseSettings {
262262
public static final BooleanSetting HIDE_SHORTS_DISLIKE_BUTTON = new BooleanSetting("revanced_hide_shorts_dislike_button", FALSE);
263263
public static final BooleanSetting HIDE_SHORTS_FULL_VIDEO_LINK_LABEL = new BooleanSetting("revanced_hide_shorts_full_video_link_label", FALSE);
264264
public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE);
265+
public static final BooleanSetting HIDE_SHORTS_NEW_POSTS_BUTTON = new BooleanSetting("revanced_hide_shorts_new_posts_button", TRUE);
265266
public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE);
266267
public static final BooleanSetting HIDE_SHORTS_HISTORY = new BooleanSetting("revanced_hide_shorts_history", FALSE);
267268
public static final BooleanSetting HIDE_SHORTS_HOME = new BooleanSetting("revanced_hide_shorts_home", FALSE);

patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ private val hideShortsComponentsResourcePatch = resourcePatch {
9898
SwitchPreference("revanced_hide_shorts_upcoming_button"),
9999
SwitchPreference("revanced_hide_shorts_green_screen_button"),
100100
SwitchPreference("revanced_hide_shorts_hashtag_button"),
101+
SwitchPreference("revanced_hide_shorts_new_posts_button"),
101102
SwitchPreference("revanced_hide_shorts_shop_button"),
102103
SwitchPreference("revanced_hide_shorts_tagged_products"),
103104
SwitchPreference("revanced_hide_shorts_search_suggestions"),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,9 @@ To show the Audio track menu, change \'Spoof video streams\' to iOS TV"</string>
827827
<string name="revanced_hide_shorts_green_screen_button_title">Hide Green screen button</string>
828828
<string name="revanced_hide_shorts_green_screen_button_summary_on">Green screen button is hidden</string>
829829
<string name="revanced_hide_shorts_green_screen_button_summary_off">Green screen button is shown</string>
830+
<string name="revanced_hide_shorts_new_posts_button_title">Hide New posts button</string>
831+
<string name="revanced_hide_shorts_new_posts_button_summary_off">New posts button is shown</string>
832+
<string name="revanced_hide_shorts_new_posts_button_summary_on">New posts button is hidden</string>
830833
<string name="revanced_hide_shorts_hashtag_button_title">Hide hashtag button</string>
831834
<string name="revanced_hide_shorts_hashtag_button_summary_on">Hashtag button is hidden</string>
832835
<string name="revanced_hide_shorts_hashtag_button_summary_off">Hashtag button is shown</string>

0 commit comments

Comments
 (0)