Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 3fb337b

Browse files
committed
feat(youtube/general-ads): hide chapter teaser under videos
1 parent d82b989 commit 3fb337b

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/main/java/app/revanced/integrations/patches/LithoFilterPatch.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ public GeneralBytecodeAdsPatch() {
228228
var channelGuidelines = new BlockRule(SettingsEnum.ADREMOVER_HIDE_CHANNEL_GUIDELINES, "channel_guidelines_entry_banner");
229229
var artistCard = new BlockRule(SettingsEnum.HIDE_ARTIST_CARD, "official_card");
230230
var selfSponsor = new BlockRule(SettingsEnum.ADREMOVER_SELF_SPONSOR_REMOVAL, "cta_shelf_card");
231+
var chapterTeaser = new BlockRule(SettingsEnum.ADREMOVER_CHAPTER_TEASER_REMOVAL, "expandable_metadata");
232+
231233
var generalAds = new BlockRule(
232234
SettingsEnum.ADREMOVER_GENERAL_ADS_REMOVAL,
233235
// could be required
@@ -257,6 +259,7 @@ public GeneralBytecodeAdsPatch() {
257259
suggestions,
258260
latestPosts,
259261
movieAds,
262+
chapterTeaser,
260263
communityGuidelines,
261264
compactBanner,
262265
inFeedSurvey,
@@ -282,7 +285,6 @@ public boolean filter(final String path, final String identifier) {
282285
if (ReVancedUtils.containsAny(path,
283286
"home_video_with_context",
284287
"related_video_with_context",
285-
"search_video_with_context",
286288
"comment_thread", // skip blocking anything in the comments
287289
"download_",
288290
"library_recent_shelf",

app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public enum SettingsEnum {
4545
ADREMOVER_HIDE_LATEST_POSTS("revanced_adremover_hide_latest_posts", true, ReturnType.BOOLEAN),
4646
ADREMOVER_HIDE_CHANNEL_GUIDELINES("revanced_adremover_hide_channel_guidelines", true, ReturnType.BOOLEAN),
4747
ADREMOVER_SELF_SPONSOR_REMOVAL("revanced_adremover_self_sponsor", true, ReturnType.BOOLEAN),
48+
ADREMOVER_CHAPTER_TEASER_REMOVAL("revanced_adremover_chapter_teaser", true, ReturnType.BOOLEAN),
4849

4950
// Action buttons
5051
HIDE_LIKE_BUTTON("revanced_like_button", false, ReturnType.BOOLEAN, false),

0 commit comments

Comments
 (0)