Merge pull request #320 from bhackel/hud-and-collapse

Copy Hide HUD and Hide Collapse Button
This commit is contained in:
Bryce Hackel
2024-08-10 05:28:47 -07:00
committed by GitHub
16 changed files with 118 additions and 0 deletions

View File

@@ -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(@"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_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_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]]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
[settingsViewController pushViewController:picker]; [settingsViewController pushViewController:picker];

View File

@@ -39,6 +39,7 @@
#import "Tweaks/YouTubeHeader/YTWatchPullToFullController.h" #import "Tweaks/YouTubeHeader/YTWatchPullToFullController.h"
#import "Tweaks/YouTubeHeader/YTPlayerBarController.h" #import "Tweaks/YouTubeHeader/YTPlayerBarController.h"
#import "Tweaks/YouTubeHeader/YTResponder.h" #import "Tweaks/YouTubeHeader/YTResponder.h"
#import "Tweaks/YouTubeHeader/YTMainAppControlsOverlayView.h"
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil] #define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
#define YT_BUNDLE_ID @"com.google.ios.youtube" #define YT_BUNDLE_ID @"com.google.ios.youtube"
@@ -121,6 +122,10 @@
@property id <YTResponder> parentResponder; @property id <YTResponder> parentResponder;
@end @end
// Hide Collapse Button - @arichornlover
@interface YTMainAppControlsOverlayView (YTLitePlus)
@property (nonatomic, assign, readwrite) YTQTMButton *watchCollapseButton;
@end
// SponsorBlock button in Nav bar // SponsorBlock button in Nav bar
@interface MDCButton : UIButton @interface MDCButton : UIButton

View File

@@ -583,6 +583,38 @@ BOOL isTabSelected = NO;
} }
%end %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 // BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
%group Main %group Main

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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" = "App Settings Overlay Options"; "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "Overlay-Optionen für App-Einstellungen"; "APP_SETTINGS_OVERLAY_OPTIONS" = "Overlay-Optionen für App-Einstellungen";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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" = "App Settings Overlay Options"; "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "Opciones de superposición de los ajustes de la aplicación"; "APP_SETTINGS_OVERLAY_OPTIONS" = "Opciones de superposición de los ajustes de la aplicación";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "Paramètres des options d'overlay de l'application"; "APP_SETTINGS_OVERLAY_OPTIONS" = "Paramètres des options d'overlay de l'application";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "アプリの設定オーバーレイの設定"; "APP_SETTINGS_OVERLAY_OPTIONS" = "アプリの設定オーバーレイの設定";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "Configurações do Aplicativo"; "APP_SETTINGS_OVERLAY_OPTIONS" = "Configurações do Aplicativo";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "Opțiuni Overlay Setări Aplicație"; "APP_SETTINGS_OVERLAY_OPTIONS" = "Opțiuni Overlay Setări Aplicație";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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" = "App Settings Overlay Options"; "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options";

View File

@@ -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" = "Hide autoplay mini preview";
"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; "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" = "App Settings Overlay Options"; "APP_SETTINGS_OVERLAY_OPTIONS" = "App Settings Overlay Options";

View File

@@ -64,6 +64,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "Uyg. Ayarları Kaplama Seç."; "APP_SETTINGS_OVERLAY_OPTIONS" = "Uyg. Ayarları Kaplama Seç.";

View File

@@ -73,6 +73,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"SHORTS_CONTROLS_OVERLAY_OPTIONS" = "Tùy chọn lớp phủ điều khiển quần short"; "SHORTS_CONTROLS_OVERLAY_OPTIONS" = "Tùy chọn lớp phủ điều khiển quần short";

View File

@@ -65,6 +65,12 @@
"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; "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_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
"APP_SETTINGS_OVERLAY_OPTIONS" = "應用程式設定隱藏項目"; "APP_SETTINGS_OVERLAY_OPTIONS" = "應用程式設定隱藏項目";