feat(YouTube - Hide Shorts components): Add option to hide comment panel (#5102)

This commit is contained in:
LisoUseInAIKyrios
2025-06-04 09:06:27 +02:00
committed by GitHub
parent 33a4798ba6
commit 22b9beedd3
5 changed files with 13 additions and 4 deletions

View File

@ -153,14 +153,12 @@ public class ReturnYouTubeDislikePatch {
} }
if (Utils.containsAny(conversionContextString, if (Utils.containsAny(conversionContextString,
"|shorts_dislike_button.eml", "|reel_dislike_button.eml" "|shorts_dislike_button.eml", "|reel_dislike_button.eml")) {
)) {
return getShortsSpan(original, true); return getShortsSpan(original, true);
} }
if (Utils.containsAny(conversionContextString, if (Utils.containsAny(conversionContextString,
"|shorts_like_button.eml", "|reel_like_button.eml" "|shorts_like_button.eml", "|reel_like_button.eml")) {
)) {
if (!Utils.containsNumber(original)) { if (!Utils.containsNumber(original)) {
Logger.printDebug(() -> "Replacing hidden likes count"); Logger.printDebug(() -> "Replacing hidden likes count");
return getShortsSpan(original, false); return getShortsSpan(original, false);

View File

@ -217,6 +217,12 @@ public final class ShortsFilter extends Filter {
// Suggested actions. // Suggested actions.
// //
suggestedActionsGroupList.addAll( suggestedActionsGroupList.addAll(
new ByteArrayFilterGroup(
Settings.HIDE_SHORTS_COMMENT_PANEL,
// Preview comment that can popup while a Short is playing.
// Uses no bundled icons, and instead the users profile photo is shown.
"shorts-comments-panel"
),
new ByteArrayFilterGroup( new ByteArrayFilterGroup(
Settings.HIDE_SHORTS_SHOP_BUTTON, Settings.HIDE_SHORTS_SHOP_BUTTON,
"yt_outline_bag_" "yt_outline_bag_"

View File

@ -275,6 +275,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_SHORTS_SEARCH = new BooleanSetting("revanced_hide_shorts_search", FALSE); public static final BooleanSetting HIDE_SHORTS_SEARCH = new BooleanSetting("revanced_hide_shorts_search", FALSE);
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", TRUE); public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", TRUE);
public static final BooleanSetting HIDE_SHORTS_SHARE_BUTTON = new BooleanSetting("revanced_hide_shorts_share_button", FALSE); public static final BooleanSetting HIDE_SHORTS_SHARE_BUTTON = new BooleanSetting("revanced_hide_shorts_share_button", FALSE);
public static final BooleanSetting HIDE_SHORTS_COMMENT_PANEL = new BooleanSetting("revanced_hide_shorts_comment_panel", TRUE);
public static final BooleanSetting HIDE_SHORTS_SHOP_BUTTON = new BooleanSetting("revanced_hide_shorts_shop_button", TRUE); public static final BooleanSetting HIDE_SHORTS_SHOP_BUTTON = new BooleanSetting("revanced_hide_shorts_shop_button", TRUE);
public static final BooleanSetting HIDE_SHORTS_SOUND_BUTTON = new BooleanSetting("revanced_hide_shorts_sound_button", FALSE); public static final BooleanSetting HIDE_SHORTS_SOUND_BUTTON = new BooleanSetting("revanced_hide_shorts_sound_button", FALSE);
public static final BooleanSetting HIDE_SHORTS_SOUND_METADATA_LABEL = new BooleanSetting("revanced_hide_shorts_sound_metadata_label", FALSE); public static final BooleanSetting HIDE_SHORTS_SOUND_METADATA_LABEL = new BooleanSetting("revanced_hide_shorts_sound_metadata_label", FALSE);

View File

@ -90,6 +90,7 @@ private val hideShortsComponentsResourcePatch = resourcePatch {
SwitchPreference("revanced_hide_shorts_paused_overlay_buttons"), SwitchPreference("revanced_hide_shorts_paused_overlay_buttons"),
// Suggested actions. // Suggested actions.
SwitchPreference("revanced_hide_shorts_comment_panel"),
SwitchPreference("revanced_hide_shorts_save_sound_button"), SwitchPreference("revanced_hide_shorts_save_sound_button"),
SwitchPreference("revanced_hide_shorts_use_template_button"), SwitchPreference("revanced_hide_shorts_use_template_button"),
SwitchPreference("revanced_hide_shorts_upcoming_button"), SwitchPreference("revanced_hide_shorts_upcoming_button"),

View File

@ -812,6 +812,9 @@ To show the Audio track menu, change \'Spoof video streams\' to iOS TV"</string>
<string name="revanced_hide_shorts_location_label_title">Hide location label</string> <string name="revanced_hide_shorts_location_label_title">Hide location label</string>
<string name="revanced_hide_shorts_location_label_summary_on">Location label is hidden</string> <string name="revanced_hide_shorts_location_label_summary_on">Location label is hidden</string>
<string name="revanced_hide_shorts_location_label_summary_off">Location label is shown</string> <string name="revanced_hide_shorts_location_label_summary_off">Location label is shown</string>
<string name="revanced_hide_shorts_comment_panel_title">Hide Comment panel</string>
<string name="revanced_hide_shorts_comment_panel_summary_on">Comment panel is hidden</string>
<string name="revanced_hide_shorts_comment_panel_summary_off">Comment panel is shown</string>
<string name="revanced_hide_shorts_save_sound_button_title">Hide Save music button</string> <string name="revanced_hide_shorts_save_sound_button_title">Hide Save music button</string>
<string name="revanced_hide_shorts_save_sound_button_summary_on">Save music button is hidden</string> <string name="revanced_hide_shorts_save_sound_button_summary_on">Save music button is hidden</string>
<string name="revanced_hide_shorts_save_sound_button_summary_off">Save music button is shown</string> <string name="revanced_hide_shorts_save_sound_button_summary_off">Save music button is shown</string>