From 4f2b55a897f03e166103c0823e54935554c32dfa Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:34:57 -0700 Subject: [PATCH] Hide comment previews by @arichornlover --- Source/Settings.xm | 1 + YTLitePlus.xm | 19 +++++++++++++++++++ .../ar.lproj/Localizable.strings | 3 +++ .../de.lproj/Localizable.strings | 3 +++ .../en.lproj/Localizable.strings | 3 +++ .../es.lproj/Localizable.strings | 3 +++ .../fr.lproj/Localizable.strings | 3 +++ .../ja.lproj/Localizable.strings | 3 +++ .../pt.lproj/Localizable.strings | 3 +++ .../ro.lproj/Localizable.strings | 3 +++ .../ru.lproj/Localizable.strings | 3 +++ .../template.lproj/Localizable.strings | 3 +++ .../tr.lproj/Localizable.strings | 3 +++ .../vi.lproj/Localizable.strings | 3 +++ .../zh_TW.lproj/Localizable.strings | 18 ++++++++++++++++++ 15 files changed, 74 insertions(+) diff --git a/Source/Settings.xm b/Source/Settings.xm index ca3518d..d809a9e 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -231,6 +231,7 @@ static const NSInteger YTLiteSection = 789; BASIC_SWITCH(LOC(@"ALWAYS_USE_REMAINING_TIME"), LOC(@"ALWAYS_USE_REMAINING_TIME_DESC"), @"alwaysShowRemainingTime_enabled"), BASIC_SWITCH(LOC(@"DISABLE_TOGGLE_TIME_REMAINING"), LOC(@"DISABLE_TOGGLE_TIME_REMAINING_DESC"), @"disableRemainingTime_enabled"), BASIC_SWITCH(LOC(@"DISABLE_ENGAGEMENT_OVERLAY"), LOC(@"DISABLE_ENGAGEMENT_OVERLAY_DESC"), @"disableEngagementOverlay_enabled"), + BASIC_SWITCH(LOC(@"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER"), LOC(@"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC"), @"hidePreviewCommentSection_enabled"), ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; diff --git a/YTLitePlus.xm b/YTLitePlus.xm index b9d5a9e..d666a27 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -542,6 +542,25 @@ BOOL isTabSelected = NO; } %end + +// Hide the Comment Section Previews under the Video Player - @arichornlover +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + if ((IsEnabled(@"hidePreviewCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"])) { + self.hidden = YES; + self.opaque = YES; + self.userInteractionEnabled = NO; + CGRect bounds = self.frame; + bounds.size.height = 0; + self.frame = bounds; + [self.superview layoutIfNeeded]; + [self setNeedsLayout]; + [self removeFromSuperview]; + } +} +%end + // BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer %group Main %hook YTWatchMiniBarView diff --git a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings index 65033e0..d431cf6 100644 --- a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options"; diff --git a/lang/YTLitePlus.bundle/de.lproj/Localizable.strings b/lang/YTLitePlus.bundle/de.lproj/Localizable.strings index 6a646dc..165978f 100644 --- a/lang/YTLitePlus.bundle/de.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/de.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "Overlay-Optionen für App-Einstellungen"; diff --git a/lang/YTLitePlus.bundle/en.lproj/Localizable.strings b/lang/YTLitePlus.bundle/en.lproj/Localizable.strings index abb87ee..29ee33c 100644 --- a/lang/YTLitePlus.bundle/en.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/en.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options"; diff --git a/lang/YTLitePlus.bundle/es.lproj/Localizable.strings b/lang/YTLitePlus.bundle/es.lproj/Localizable.strings index 5487a67..a2c2da3 100644 --- a/lang/YTLitePlus.bundle/es.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/es.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Desactivar la superposición de compromiso a pantalla completa"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Desactivar el gesto de deslizar hacia arriba y la lista de vídeos sugeridos en pantalla completa"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "Opciones de superposición de los ajustes de la aplicación"; diff --git a/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings b/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings index edbf12b..49bb669 100644 --- a/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "Paramètres des options d'overlay de l'application"; diff --git a/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings index 17bb1c4..794038b 100644 --- a/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "プレーヤー下のコメントプレビューを隠す"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "プレーヤーの下にあるコメントのプレビューを非表示にします。"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "アプリの設定オーバーレイの設定"; diff --git a/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings b/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings index e829c49..f4014f7 100644 --- a/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Desativar sobreposição de engajamento em tela cheia"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Desativa o gesto de deslizar para cima e a lista de vídeos sugeridos em tela cheia"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "Configurações do Aplicativo"; diff --git a/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings index 018886c..fde5937 100644 --- a/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "Opțiuni Overlay Setări Aplicație"; diff --git a/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings index f2245c6..32b201c 100644 --- a/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options"; diff --git a/lang/YTLitePlus.bundle/template.lproj/Localizable.strings b/lang/YTLitePlus.bundle/template.lproj/Localizable.strings index b0ba5c7..de571b5 100644 --- a/lang/YTLitePlus.bundle/template.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/template.lproj/Localizable.strings @@ -62,6 +62,9 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options"; diff --git a/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings b/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings index 5220806..3b58ba0 100644 --- a/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings @@ -47,6 +47,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Tam ekranda kaplamayı kapat"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Tam ekranda yukarı kaydırma hareketini ve önerilen videoları kapat"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Oynatıcının Altındaki Yorum Önizlemelerini Gizle"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Video oynatıcının altındaki yorum önizlemelerini gizler."; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "Uyg. Ayarları Kaplama Seç."; diff --git a/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings b/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings index 12f1e32..5050e13 100644 --- a/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings @@ -56,6 +56,9 @@ "DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; "DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // Shorts controls overlay options "SHORTS_CONTROLS_OVERLAY_OPTIONS" = "Tùy chọn lớp phủ điều khiển quần short"; diff --git a/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings b/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings index 001af33..8176bc0 100644 --- a/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings @@ -33,6 +33,24 @@ "SEEK_ANYWHERE" = "Seek Anywhere Gesture"; "SEEK_ANYWHERE_DESC" = "Hold and drag on the video player to seek. You must disable YTLite - Hold to speed"; +"ENABLE_TAP_TO_SEEK" = "Enable Tap To Seek"; +"ENABLE_TAP_TO_SEEK_DESC" = "Jump to anywhere in a video by single-tapping the seek bar"; + +"DISABLE_PULL_TO_FULLSCREEN_GESTURE" = "Disable pull-to-fullscreen gesture"; +"DISABLE_PULL_TO_FULLSCREEN_GESTURE_DESC" = "Disable the drag gesture to enter vertical fullscreen. Only applies to landscape videos."; + +"ALWAYS_USE_REMAINING_TIME" = "Always use remaining time"; +"ALWAYS_USE_REMAINING_TIME_DESC" = "Change the default to show time remaining in the player bar."; + +"DISABLE_TOGGLE_TIME_REMAINING" = "Disable toggle time remaining"; +"DISABLE_TOGGLE_TIME_REMAINING_DESC" = "Disables changing time elapsed to time remaining. Use with other setting to always show remaining time."; + +"DISABLE_ENGAGEMENT_OVERLAY" = "Disable fullscreen engagement overlay"; +"DISABLE_ENGAGEMENT_OVERLAY_DESC" = "Disable the swipe-up gesture and suggested videos list in fullscreen"; + +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; +"HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "應用程式設定隱藏項目";