feat(YouTube - Hide description components): Add Hide Ask (#4972)

This commit is contained in:
ILoveOpenSourceApplications 2025-05-17 13:22:33 +05:30 committed by GitHub
parent 1cd7067b61
commit ebc94a5da6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,11 @@ final class DescriptionComponentsFilter extends Filter {
"cell_expandable_metadata.eml" "cell_expandable_metadata.eml"
); );
final StringFilterGroup askSection = new StringFilterGroup(
Settings.HIDE_ASK_SECTION,
"youchat_entrypoint.eml"
);
final StringFilterGroup attributesSection = new StringFilterGroup( final StringFilterGroup attributesSection = new StringFilterGroup(
Settings.HIDE_ATTRIBUTES_SECTION, Settings.HIDE_ATTRIBUTES_SECTION,
"gaming_section", "gaming_section",
@ -73,6 +78,7 @@ final class DescriptionComponentsFilter extends Filter {
addPathCallbacks( addPathCallbacks(
aiGeneratedVideoSummarySection, aiGeneratedVideoSummarySection,
askSection,
attributesSection, attributesSection,
infoCardsSection, infoCardsSection,
howThisWasMadeSection, howThisWasMadeSection,

View File

@ -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); public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE);
// Description // 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_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_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_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); public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("revanced_hide_how_this_was_made_section", FALSE);

View File

@ -143,6 +143,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
key = "revanced_hide_description_components_screen", key = "revanced_hide_description_components_screen",
preferences = setOf( preferences = setOf(
SwitchPreference("revanced_hide_ai_generated_video_summary_section"), SwitchPreference("revanced_hide_ai_generated_video_summary_section"),
SwitchPreference("revanced_hide_ask_section"),
SwitchPreference("revanced_hide_attributes_section"), SwitchPreference("revanced_hide_attributes_section"),
SwitchPreference("revanced_hide_chapters_section"), SwitchPreference("revanced_hide_chapters_section"),
SwitchPreference("revanced_hide_info_cards_section"), SwitchPreference("revanced_hide_info_cards_section"),

View File

@ -296,6 +296,9 @@ You will not be notified of any unexpected events."</string>
<string name="revanced_hide_ai_generated_video_summary_section_title">Hide \'AI-generated video summary\'</string> <string name="revanced_hide_ai_generated_video_summary_section_title">Hide \'AI-generated video summary\'</string>
<string name="revanced_hide_ai_generated_video_summary_section_summary_on">Video summary section is hidden</string> <string name="revanced_hide_ai_generated_video_summary_section_summary_on">Video summary section is hidden</string>
<string name="revanced_hide_ai_generated_video_summary_section_summary_off">Video summary section is shown</string> <string name="revanced_hide_ai_generated_video_summary_section_summary_off">Video summary section is shown</string>
<string name="revanced_hide_ask_section_title">Hide Ask</string>
<string name="revanced_hide_ask_section_summary_on">Ask section is hidden</string>
<string name="revanced_hide_ask_section_summary_off">Ask section is shown</string>
<string name="revanced_hide_attributes_section_title">Hide Attributes</string> <string name="revanced_hide_attributes_section_title">Hide Attributes</string>
<string name="revanced_hide_attributes_section_summary_on">Featured places, Games, Music, and People mentioned sections are hidden</string> <string name="revanced_hide_attributes_section_summary_on">Featured places, Games, Music, and People mentioned sections are hidden</string>
<string name="revanced_hide_attributes_section_summary_off">Featured places, Games, Music, and People mentioned sections are shown</string> <string name="revanced_hide_attributes_section_summary_off">Featured places, Games, Music, and People mentioned sections are shown</string>