diff --git a/Source/Settings.xm b/Source/Settings.xm index 93125ee..331c9bf 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -231,6 +231,9 @@ static const NSInteger YTLiteSection = 789; 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"), BASIC_SWITCH(LOC(@"HIDE_AUTOPLAY_MINI_PREVIEW"), LOC(@"HIDE_AUTOPLAY_MINI_PREVIEW_DESC"), @"hideAutoplayMiniPreview_enabled"), + BASIC_SWITCH(LOC(@"HIDE_HUD_MESSAGES"), LOC(@"HIDE_HUD_MESSAGES_DESC"), @"hideHUD_enabled"), + BASIC_SWITCH(LOC(@"HIDE_COLLAPSE_BUTTON"), LOC(@"HIDE_COLLAPSE_BUTTON_DESC"), @"disableCollapseButton_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.h b/YTLitePlus.h index 90611be..82d6ac1 100644 --- a/YTLitePlus.h +++ b/YTLitePlus.h @@ -39,6 +39,7 @@ #import "Tweaks/YouTubeHeader/YTWatchPullToFullController.h" #import "Tweaks/YouTubeHeader/YTPlayerBarController.h" #import "Tweaks/YouTubeHeader/YTResponder.h" +#import "Tweaks/YouTubeHeader/YTMainAppControlsOverlayView.h" #define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil] #define YT_BUNDLE_ID @"com.google.ios.youtube" @@ -121,6 +122,10 @@ @property id parentResponder; @end +// Hide Collapse Button - @arichornlover +@interface YTMainAppControlsOverlayView (YTLitePlus) +@property (nonatomic, assign, readwrite) YTQTMButton *watchCollapseButton; +@end // SponsorBlock button in Nav bar @interface MDCButton : UIButton diff --git a/YTLitePlus.xm b/YTLitePlus.xm index bd0938b..c4248cb 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -583,6 +583,38 @@ BOOL isTabSelected = NO; } %end +// Hide HUD Messages - @qnblackcat +%hook YTHUDMessageView +- (id)initWithMessage:(id)arg1 dismissHandler:(id)arg2 { + return IsEnabled(@"hideHUD_enabled") ? nil : %orig; +} +%end + +// Hide Video Player Collapse Button - @arichornlover +%hook YTMainAppControlsOverlayView +- (void)layoutSubviews { + %orig; + if (IsEnabled(@"disableCollapseButton_enabled")) { + if (self.watchCollapseButton) { + [self.watchCollapseButton removeFromSuperview]; + } + } +} +- (BOOL)watchCollapseButtonHidden { + if (IsEnabled(@"disableCollapseButton_enabled")) { + return YES; + } else { + return %orig; + } +} +- (void)setWatchCollapseButtonAvailable:(BOOL)available { + if (IsEnabled(@"disableCollapseButton_enabled")) { + } else { + %orig(available); + } +} +%end + /* // BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer %group Main diff --git a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings index 041d6a6..496cfb4 100644 --- a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "إخفاء رسائل المعلومات"; +"HIDE_HUD_MESSAGES_DESC" = "مثلاً: تم إيقاف الترجمة..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 eedad7c..8d1dee7 100644 --- a/lang/YTLitePlus.bundle/de.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/de.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "HUD-Nachrichten ausblenden"; +"HIDE_HUD_MESSAGES_DESC" = "z.B.: Untertitel sind aktiviert/deaktiviert, Videoschleife ist an, ..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 ffbe59a..6c805d4 100644 --- a/lang/YTLitePlus.bundle/en.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/en.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Hide HUD messages"; +"HIDE_HUD_MESSAGES_DESC" = "Hides snackbars that display for certain actions (e.g., CC turned on/off)"; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 ff13867..6b1d700 100644 --- a/lang/YTLitePlus.bundle/es.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/es.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Ocultar mensajes HUD"; +"HIDE_HUD_MESSAGES_DESC" = "Ejemplo: CC está activado/desactivado, Vídeo en bucle está activado,..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 a784e9b..ec9a68c 100644 --- a/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Masquer les messages de l'ATH"; +"HIDE_HUD_MESSAGES_DESC" = "Exemple : Les sous-titres sont activés/désactivés, la boucle vidéo est activée,..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 6b67d73..1550594 100644 --- a/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "HUDメッセージを非表示"; +"HIDE_HUD_MESSAGES_DESC" = "特定のアクション後に表示されるスナックバーを非表示にします。(例: 字幕がオン/オフになりました など)"; + +"HIDE_COLLAPSE_BUTTON" = "折りたたみボタンを隠す"; +"HIDE_COLLAPSE_BUTTON_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 30133a2..2c580f6 100644 --- a/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Ocultar Mensagens do HUD"; +"HIDE_HUD_MESSAGES_DESC" = "Exemplo: Legendas/CC ativadas/desativadas, A repetição do vídeo está ativada,..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 49d413f..6bec7d1 100644 --- a/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Ascundere Mesaje HUD"; +"HIDE_HUD_MESSAGES_DESC" = "Exemplu: Subtitrările sunt activate/dezactivate, Redarea în buclă este activată,..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 f29c9b2..f7f6443 100644 --- a/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Скрыть сообщения плеера"; +"HIDE_HUD_MESSAGES_DESC" = "Скрывает надписи YouTube, появляющиеся поверх видео."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 0d1e58d..5e6f94d 100644 --- a/lang/YTLitePlus.bundle/template.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/template.lproj/Localizable.strings @@ -79,6 +79,12 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Hide HUD messages"; +"HIDE_HUD_MESSAGES_DESC" = "Hides snackbars that display for certain actions (e.g., CC turned on/off)"; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 8db663c..e1d707f 100644 --- a/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings @@ -64,6 +64,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "HUD mesajlarını gizle"; +"HIDE_HUD_MESSAGES_DESC" = "Belirli işlemler için görüntülenen bildirim çubuklarını gizler (ör. CC açıldı/kapandı)"; + +"HIDE_COLLAPSE_BUTTON" = "Daraltma Düğmesini Gizle"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Video oynatıcıda sol üstte görünen ok ile daraltma düğmesini 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 27fa187..49194cd 100644 --- a/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings @@ -73,6 +73,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "Ẩn thông báo HUD"; +"HIDE_HUD_MESSAGES_DESC" = "Ví dụ: Đã bật/tắt phụ đề, Tính năng phát video lặp lại đang bật,..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // 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 bca5cf7..f4d3dfa 100644 --- a/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings @@ -65,6 +65,12 @@ "HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; +"HIDE_HUD_MESSAGES" = "隱藏 HUD 訊息"; +"HIDE_HUD_MESSAGES_DESC" = "例如:CC字幕、開啟/關閉、影片循環開啟等..."; + +"HIDE_COLLAPSE_BUTTON" = "Hide Collapse Button"; +"HIDE_COLLAPSE_BUTTON_DESC" = "Hides the Arrow Collapse Button that was shown in the Top Left of the Video Player."; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "應用程式設定隱藏項目";