Skip to content

Commit 6b26346

Browse files
fix(YouTube): Resolve UI components not hiding for some users (#6054)
1 parent b1511c7 commit 6b26346

13 files changed

+97
-97
lines changed

extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/ReturnYouTubeDislikePatch.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ private static CharSequence onLithoTextLoaded(@NonNull Object conversionContext,
131131

132132
String conversionContextString = conversionContext.toString();
133133

134-
if (isRollingNumber && !conversionContextString.contains("video_action_bar.eml")) {
134+
if (isRollingNumber && !conversionContextString.contains("video_action_bar.e")) {
135135
return original;
136136
}
137137

138-
if (conversionContextString.contains("segmented_like_dislike_button.eml")) {
138+
if (conversionContextString.contains("segmented_like_dislike_button.e")) {
139139
// Regular video.
140140
ReturnYouTubeDislike videoData = currentVideoData;
141141
if (videoData == null) {
@@ -153,12 +153,12 @@ private static CharSequence onLithoTextLoaded(@NonNull Object conversionContext,
153153
}
154154

155155
if (Utils.containsAny(conversionContextString,
156-
"|shorts_dislike_button.eml", "|reel_dislike_button.eml")) {
156+
"|shorts_dislike_button.e", "|reel_dislike_button.e")) {
157157
return getShortsSpan(original, true);
158158
}
159159

160160
if (Utils.containsAny(conversionContextString,
161-
"|shorts_like_button.eml", "|reel_like_button.eml")) {
161+
"|shorts_like_button.e", "|reel_like_button.e")) {
162162
if (!Utils.containsNumber(original)) {
163163
Logger.printDebug(() -> "Replacing hidden likes count");
164164
return getShortsSpan(original, false);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@ public AdsFilter() {
105105
Settings.HIDE_VIEW_PRODUCTS_BANNER,
106106
"product_item",
107107
"products_in_video",
108-
"shopping_overlay.eml" // Video player overlay shopping links.
108+
"shopping_overlay.e" // Video player overlay shopping links.
109109
);
110110

111111
final var shoppingLinks = new StringFilterGroup(
112112
Settings.HIDE_SHOPPING_LINKS,
113-
"shopping_description_shelf.eml"
113+
"shopping_description_shelf.e"
114114
);
115115

116116
playerShoppingShelf = new StringFilterGroup(
117117
Settings.HIDE_CREATOR_STORE_SHELF,
118-
"horizontal_shelf.eml"
118+
"horizontal_shelf.e"
119119
);
120120

121121
playerShoppingShelfBuffer = new ByteArrayFilterGroup(
@@ -131,7 +131,7 @@ public AdsFilter() {
131131
final var merchandise = new StringFilterGroup(
132132
Settings.HIDE_MERCHANDISE_BANNERS,
133133
"product_carousel",
134-
"shopping_carousel.eml" // Channel profile shopping shelf.
134+
"shopping_carousel.e" // Channel profile shopping shelf.
135135
);
136136

137137
final var selfSponsor = new StringFilterGroup(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public final class AdvancedVideoQualityMenuFilter extends Filter {
1414
public AdvancedVideoQualityMenuFilter() {
1515
addPathCallbacks(new StringFilterGroup(
1616
Settings.ADVANCED_VIDEO_QUALITY_MENU,
17-
"quick_quality_sheet_content.eml-js"
17+
"quick_quality_sheet_content.e"
1818
));
1919
}
2020

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
@SuppressWarnings("unused")
66
final class ButtonsFilter extends Filter {
7-
private static final String COMPACT_CHANNEL_BAR_PATH_PREFIX = "compact_channel_bar.eml";
8-
private static final String VIDEO_ACTION_BAR_PATH_PREFIX = "video_action_bar.eml";
9-
private static final String VIDEO_ACTION_BAR_PATH = "video_action_bar.eml";
7+
private static final String COMPACT_CHANNEL_BAR_PATH_PREFIX = "compact_channel_bar.e";
8+
private static final String VIDEO_ACTION_BAR_PATH_PREFIX = "video_action_bar.e";
9+
private static final String VIDEO_ACTION_BAR_PATH = "video_action_bar.e";
1010
/**
1111
* Video bar path when the video information is collapsed. Seems to shown only with 20.14+
1212
*/
13-
private static final String COMPACTIFY_VIDEO_ACTION_BAR_PATH = "compactify_video_action_bar.eml";
13+
private static final String COMPACTIFY_VIDEO_ACTION_BAR_PATH = "compactify_video_action_bar.e";
1414
private static final String ANIMATED_VECTOR_TYPE_PATH = "AnimatedVectorType";
1515

1616
private final StringFilterGroup likeSubscribeGlow;
@@ -28,12 +28,12 @@ public ButtonsFilter() {
2828

2929
likeSubscribeGlow = new StringFilterGroup(
3030
Settings.DISABLE_LIKE_SUBSCRIBE_GLOW,
31-
"animated_button_border.eml"
31+
"animated_button_border.e"
3232
);
3333

3434
bufferFilterPathGroup = new StringFilterGroup(
3535
null,
36-
"|ContainerType|button.eml"
36+
"|ContainerType|button.e"
3737
);
3838

3939
addPathCallbacks(
@@ -45,15 +45,15 @@ public ButtonsFilter() {
4545
),
4646
new StringFilterGroup(
4747
Settings.HIDE_DOWNLOAD_BUTTON,
48-
"|download_button.eml"
48+
"|download_button.e"
4949
),
5050
new StringFilterGroup(
5151
Settings.HIDE_SAVE_BUTTON,
5252
"|save_to_playlist_button"
5353
),
5454
new StringFilterGroup(
5555
Settings.HIDE_CLIP_BUTTON,
56-
"|clip_button.eml"
56+
"|clip_button.e"
5757
)
5858
);
5959

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@SuppressWarnings("unused")
77
final class CommentsFilter extends Filter {
88

9-
private static final String COMMENT_COMPOSER_PATH = "comment_composer.eml";
9+
private static final String COMMENT_COMPOSER_PATH = "comment_composer.e";
1010

1111
private final StringFilterGroup chipBar;
1212
private final ByteArrayFilterGroup aiCommentsSummary;
@@ -15,12 +15,12 @@ final class CommentsFilter extends Filter {
1515
public CommentsFilter() {
1616
var chatSummary = new StringFilterGroup(
1717
Settings.HIDE_COMMENTS_AI_CHAT_SUMMARY,
18-
"live_chat_summary_banner.eml"
18+
"live_chat_summary_banner.e"
1919
);
2020

2121
chipBar = new StringFilterGroup(
2222
Settings.HIDE_COMMENTS_AI_SUMMARY,
23-
"chip_bar.eml"
23+
"chip_bar.e"
2424
);
2525

2626
aiCommentsSummary = new ByteArrayFilterGroup(
@@ -35,8 +35,8 @@ public CommentsFilter() {
3535

3636
var commentsByMembers = new StringFilterGroup(
3737
Settings.HIDE_COMMENTS_BY_MEMBERS_HEADER,
38-
"sponsorships_comments_header.eml",
39-
"sponsorships_comments_footer.eml"
38+
"sponsorships_comments_header.e",
39+
"sponsorships_comments_footer.e"
4040
);
4141

4242
var comments = new StringFilterGroup(
@@ -52,7 +52,7 @@ public CommentsFilter() {
5252

5353
var createAShort = new StringFilterGroup(
5454
Settings.HIDE_COMMENTS_CREATE_A_SHORT_BUTTON,
55-
"composer_short_creation_button.eml"
55+
"composer_short_creation_button.e"
5656
);
5757

5858
emojiAndTimestampButtons = new StringFilterGroup(
@@ -69,7 +69,7 @@ public CommentsFilter() {
6969

7070
var thanksButton = new StringFilterGroup(
7171
Settings.HIDE_COMMENTS_THANKS_BUTTON,
72-
"super_thanks_button.eml"
72+
"super_thanks_button.e"
7373
);
7474

7575
addPathCallbacks(

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public DescriptionComponentsFilter() {
2929

3030
aiGeneratedVideoSummarySection = new StringFilterGroup(
3131
Settings.HIDE_AI_GENERATED_VIDEO_SUMMARY_SECTION,
32-
"cell_expandable_metadata.eml"
32+
"cell_expandable_metadata.e"
3333
);
3434

3535
final StringFilterGroup askSection = new StringFilterGroup(
3636
Settings.HIDE_ASK_SECTION,
37-
"youchat_entrypoint.eml"
37+
"youchat_entrypoint.e"
3838
);
3939

4040
final StringFilterGroup attributesSection = new StringFilterGroup(
@@ -65,7 +65,7 @@ public DescriptionComponentsFilter() {
6565

6666
macroMarkersCarousel = new StringFilterGroup(
6767
null,
68-
"macro_markers_carousel.eml"
68+
"macro_markers_carousel.e"
6969
);
7070

7171
macroMarkersCarouselGroupList.addAll(
@@ -81,7 +81,7 @@ public DescriptionComponentsFilter() {
8181

8282
horizontalShelf = new StringFilterGroup(
8383
Settings.HIDE_ATTRIBUTES_SECTION,
84-
"horizontal_shelf.eml"
84+
"horizontal_shelf.e"
8585
);
8686

8787
cellVideoAttribute = new ByteArrayFilterGroup(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public HideInfoCardsFilter() {
99
addIdentifierCallbacks(
1010
new StringFilterGroup(
1111
Settings.HIDE_INFO_CARDS,
12-
"info_card_teaser_overlay.eml"
12+
"info_card_teaser_overlay.e"
1313
)
1414
);
1515
}

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ final class KeywordContentFilter extends Filter {
7979
"search_vwc_description_transition_key",
8080
"g-high-recZ",
8181
// Text and litho components found in the buffer that belong to path filters.
82-
"expandable_metadata.eml",
83-
"thumbnail.eml",
84-
"avatar.eml",
85-
"overflow_button.eml",
82+
"expandable_metadata.e",
83+
"thumbnail.e",
84+
"avatar.e",
85+
"overflow_button.e",
8686
"shorts-lockup-image",
8787
"shorts-lockup.overlay-metadata.secondary-text",
8888
"YouTubeSans-SemiBold",
@@ -94,16 +94,16 @@ final class KeywordContentFilter extends Filter {
9494
*/
9595
private final StringFilterGroup startsWithFilter = new StringFilterGroup(
9696
null, // Multiple settings are used and must be individually checked if active.
97-
"home_video_with_context.eml",
98-
"search_video_with_context.eml",
99-
"video_with_context.eml", // Subscription tab videos.
100-
"related_video_with_context.eml",
97+
"home_video_with_context.e",
98+
"search_video_with_context.e",
99+
"video_with_context.e", // Subscription tab videos.
100+
"related_video_with_context.e",
101101
// A/B test for subscribed video, and sometimes when tablet layout is enabled.
102-
"video_lockup_with_attachment.eml",
103-
"compact_video.eml",
102+
"video_lockup_with_attachment.e",
103+
"compact_video.e",
104104
"inline_shorts",
105105
"shorts_video_cell",
106-
"shorts_pivot_item.eml"
106+
"shorts_pivot_item.e"
107107
);
108108

109109
/**
@@ -112,9 +112,9 @@ final class KeywordContentFilter extends Filter {
112112
@SuppressWarnings("FieldCanBeLocal")
113113
private final StringFilterGroup containsFilter = new StringFilterGroup(
114114
null,
115-
"modern_type_shelf_header_content.eml",
116-
"shorts_lockup_cell.eml", // Part of 'shorts_shelf_carousel.eml'
117-
"video_card.eml" // Shorts that appear in a horizontal shelf.
115+
"modern_type_shelf_header_content.e",
116+
"shorts_lockup_cell.e", // Part of 'shorts_shelf_carousel.e'
117+
"video_card.e" // Shorts that appear in a horizontal shelf.
118118
);
119119

120120
/**
@@ -125,10 +125,10 @@ final class KeywordContentFilter extends Filter {
125125
* the buffer of the parent component was already searched and passed.
126126
*/
127127
private final StringTrieSearch exceptions = new StringTrieSearch(
128-
"metadata.eml",
129-
"thumbnail.eml",
130-
"avatar.eml",
131-
"overflow_button.eml"
128+
"metadata.e",
129+
"thumbnail.e",
130+
"avatar.e",
131+
"overflow_button.e"
132132
);
133133

134134
/**

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ public LayoutComponentsFilter() {
7676
communityPosts = new StringFilterGroup(
7777
Settings.HIDE_COMMUNITY_POSTS,
7878
"post_base_wrapper", // may be obsolete and no longer needed.
79-
"text_post_root.eml",
80-
"images_post_root.eml",
81-
"images_post_slim.eml", // may be obsolete and no longer needed.
82-
"images_post_root_slim.eml",
83-
"text_post_root_slim.eml",
84-
"post_base_wrapper_slim.eml",
85-
"poll_post_root.eml",
86-
"videos_post_root.eml",
87-
"post_shelf_slim.eml",
88-
"videos_post_responsive_root.eml",
89-
"text_post_responsive_root.eml",
90-
"poll_post_responsive_root.eml"
79+
"text_post_root.e",
80+
"images_post_root.e",
81+
"images_post_slim.e", // may be obsolete and no longer needed.
82+
"images_post_root_slim.e",
83+
"text_post_root_slim.e",
84+
"post_base_wrapper_slim.e",
85+
"poll_post_root.e",
86+
"videos_post_root.e",
87+
"post_shelf_slim.e",
88+
"videos_post_responsive_root.e",
89+
"text_post_responsive_root.e",
90+
"poll_post_responsive_root.e"
9191
);
9292

9393
final var subscribersCommunityGuidelines = new StringFilterGroup(
@@ -149,7 +149,7 @@ public LayoutComponentsFilter() {
149149

150150
final var channelLinksPreview = new StringFilterGroup(
151151
Settings.HIDE_LINKS_PREVIEW,
152-
"attribution.eml"
152+
"attribution.e"
153153
);
154154

155155
final var emergencyBox = new StringFilterGroup(
@@ -190,8 +190,8 @@ public LayoutComponentsFilter() {
190190

191191
final var playables = new StringFilterGroup(
192192
Settings.HIDE_PLAYABLES,
193-
"horizontal_gaming_shelf.eml",
194-
"mini_game_card.eml"
193+
"horizontal_gaming_shelf.e",
194+
"mini_game_card.e"
195195
);
196196

197197
// Playable horizontal shelf header.
@@ -228,7 +228,7 @@ public LayoutComponentsFilter() {
228228

229229
compactChannelBarInnerButton = new StringFilterGroup(
230230
null,
231-
"|button.eml"
231+
"|button.e"
232232
);
233233

234234
joinMembershipButton = new ByteArrayFilterGroup(
@@ -248,13 +248,13 @@ public LayoutComponentsFilter() {
248248

249249
final var videoRecommendationLabels = new StringFilterGroup(
250250
Settings.HIDE_VIDEO_RECOMMENDATION_LABELS,
251-
"endorsement_header_footer.eml"
251+
"endorsement_header_footer.e"
252252
);
253253

254254
channelProfile = new StringFilterGroup(
255255
null,
256-
"channel_profile.eml",
257-
"page_header.eml"
256+
"channel_profile.e",
257+
"page_header.e"
258258
);
259259
channelProfileBuffer = new ByteArrayFilterGroupList();
260260
channelProfileBuffer.addAll(new ByteArrayFilterGroup(
@@ -269,15 +269,15 @@ public LayoutComponentsFilter() {
269269

270270
horizontalShelves = new StringFilterGroup(
271271
Settings.HIDE_HORIZONTAL_SHELVES,
272-
"horizontal_video_shelf.eml",
273-
"horizontal_shelf.eml",
274-
"horizontal_shelf_inline.eml",
275-
"horizontal_tile_shelf.eml"
272+
"horizontal_video_shelf.e",
273+
"horizontal_shelf.e",
274+
"horizontal_shelf_inline.e",
275+
"horizontal_tile_shelf.e"
276276
);
277277

278278
ticketShelf = new ByteArrayFilterGroup(
279279
Settings.HIDE_TICKET_SHELF,
280-
"ticket_item.eml"
280+
"ticket_item.e"
281281
);
282282

283283
addPathCallbacks(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ public PlaybackSpeedMenuFilter() {
2424
// 0.05x litho speed menu.
2525
var playbackRateSelectorGroup = new StringFilterGroup(
2626
Settings.CUSTOM_SPEED_MENU,
27-
"playback_rate_selector_menu_sheet.eml-js"
27+
"playback_rate_selector_menu_sheet.e"
2828
);
2929

3030
// Old litho based speed menu.
3131
oldPlaybackMenuGroup = new StringFilterGroup(
3232
Settings.CUSTOM_SPEED_MENU,
33-
"playback_speed_sheet_content.eml-js");
33+
"playback_speed_sheet_content.e");
3434

3535
addPathCallbacks(playbackRateSelectorGroup, oldPlaybackMenuGroup);
3636
}

0 commit comments

Comments
 (0)