diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java index 3ccdd97f8..d74b7c9b8 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/DescriptionComponentsFilter.java @@ -28,6 +28,11 @@ final class DescriptionComponentsFilter extends Filter { "cell_expandable_metadata.eml" ); + final StringFilterGroup askSection = new StringFilterGroup( + Settings.HIDE_ASK_SECTION, + "youchat_entrypoint.eml" + ); + final StringFilterGroup attributesSection = new StringFilterGroup( Settings.HIDE_ATTRIBUTES_SECTION, "gaming_section", @@ -73,6 +78,7 @@ final class DescriptionComponentsFilter extends Filter { addPathCallbacks( aiGeneratedVideoSummarySection, + askSection, attributesSection, infoCardsSection, howThisWasMadeSection, diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java index 854e3f29c..98a9a435f 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java @@ -185,6 +185,7 @@ public class Settings extends BaseSettings { public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE); // Description public static final BooleanSetting HIDE_AI_GENERATED_VIDEO_SUMMARY_SECTION = new BooleanSetting("revanced_hide_ai_generated_video_summary_section", FALSE); + public static final BooleanSetting HIDE_ASK_SECTION = new BooleanSetting("revanced_hide_ask_section", FALSE); public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE); public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE); public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("revanced_hide_how_this_was_made_section", FALSE); diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index 3cad01e69..af8e3344b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -143,6 +143,7 @@ val hideLayoutComponentsPatch = bytecodePatch( key = "revanced_hide_description_components_screen", preferences = setOf( SwitchPreference("revanced_hide_ai_generated_video_summary_section"), + SwitchPreference("revanced_hide_ask_section"), SwitchPreference("revanced_hide_attributes_section"), SwitchPreference("revanced_hide_chapters_section"), SwitchPreference("revanced_hide_info_cards_section"), diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml index 53dc1b801..ad75215ec 100644 --- a/patches/src/main/resources/addresources/values/strings.xml +++ b/patches/src/main/resources/addresources/values/strings.xml @@ -296,6 +296,9 @@ You will not be notified of any unexpected events." Hide \'AI-generated video summary\' Video summary section is hidden Video summary section is shown + Hide Ask + Ask section is hidden + Ask section is shown Hide Attributes Featured places, Games, Music, and People mentioned sections are hidden Featured places, Games, Music, and People mentioned sections are shown