From 948ea5ff2906aec19c83727d5f5b16d1cc81a0ad Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 10 Aug 2024 00:53:31 +0000 Subject: [PATCH 01/10] updated submodules --- Tweaks/Return-YouTube-Dislikes | 2 +- Tweaks/protobuf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tweaks/Return-YouTube-Dislikes b/Tweaks/Return-YouTube-Dislikes index 12c4c05..0f4c6b7 160000 --- a/Tweaks/Return-YouTube-Dislikes +++ b/Tweaks/Return-YouTube-Dislikes @@ -1 +1 @@ -Subproject commit 12c4c05aec6e10c618b7fb175bd903c6c4227e7f +Subproject commit 0f4c6b7f5960308161c870d9aab30905fe8145cc diff --git a/Tweaks/protobuf b/Tweaks/protobuf index 903c3f1..b9d1cff 160000 --- a/Tweaks/protobuf +++ b/Tweaks/protobuf @@ -1 +1 @@ -Subproject commit 903c3f15b04d99ab88cee53e4cec9464ef292bce +Subproject commit b9d1cfff8ca6814723889bade011f3fa4675d46d 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 02/10] 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" = "應用程式設定隱藏項目"; From 794fb561c9d256dca532b6a6b07525479d672114 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:29:34 -0700 Subject: [PATCH 03/10] Fix import export settings localization --- lang/YTLitePlus.bundle/ar.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/de.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/en.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/es.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/fr.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/ja.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/pt.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/ro.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/ru.lproj/Localizable.strings | 11 +++++++++++ .../template.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/tr.lproj/Localizable.strings | 11 +++++++++++ lang/YTLitePlus.bundle/vi.lproj/Localizable.strings | 11 +++++++++++ .../YTLitePlus.bundle/zh_TW.lproj/Localizable.strings | 11 +++++++++++ 13 files changed, 143 insertions(+) diff --git a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings index d431cf6..9669e33 100644 --- a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "نسخة YTLitePlus: %@"; "VERSION_CHECK" = "انقر للتحقق من وجود تحديث"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "خيارات تراكب ضوابط الفيديو"; diff --git a/lang/YTLitePlus.bundle/de.lproj/Localizable.strings b/lang/YTLitePlus.bundle/de.lproj/Localizable.strings index 165978f..41c62eb 100644 --- a/lang/YTLitePlus.bundle/de.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/de.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "YTLitePlus's version: %@"; "VERSION_CHECK" = "Tippe hier, um nach Updates zu suchen!"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Overlay-Optionen für Videosteuerungen"; diff --git a/lang/YTLitePlus.bundle/en.lproj/Localizable.strings b/lang/YTLitePlus.bundle/en.lproj/Localizable.strings index 29ee33c..1964212 100644 --- a/lang/YTLitePlus.bundle/en.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/en.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "YTLitePlus's version: %@"; "VERSION_CHECK" = "Tap to check for update!"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; diff --git a/lang/YTLitePlus.bundle/es.lproj/Localizable.strings b/lang/YTLitePlus.bundle/es.lproj/Localizable.strings index a2c2da3..b5d54cd 100644 --- a/lang/YTLitePlus.bundle/es.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/es.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "Versión de YTLitePlus: %@"; "VERSION_CHECK" = "Pulse para comprobar si hay actualizaciones."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opciones de superposición de controles de vídeo"; diff --git a/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings b/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings index 49bb669..22fda27 100644 --- a/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "YTLitePlus version : %@"; "VERSION_CHECK" = "Appuyez pour vérifier les mises à jour !"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Options de l'overlay des contrôles vidéo"; diff --git a/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings index 794038b..9782bf5 100644 --- a/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "YTLitePlusのバージョン: %@"; "VERSION_CHECK" = "タップして更新をチェック!"; +"COPY_SETTINGS" = "設定をコピー"; +"COPY_SETTINGS_DESC" = "現在のすべての設定をクリップボードにコピーします"; +"PASTE_SETTINGS" = "設定を貼り付け"; +"PASTE_SETTINGS_DESC" = "クリップボードから設定を貼り付けて適用します"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "動画コントロールオーバーレイの設定"; diff --git a/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings b/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings index f4014f7..210e80d 100644 --- a/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "Versão do YTLitePlus: %@"; "VERSION_CHECK" = "Toque para verificar se há atualização!"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opções de Sobreposição de Controles de Vídeo"; diff --git a/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings index fde5937..52e72e6 100644 --- a/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "Versiune YTLitePlus: %@"; "VERSION_CHECK" = "Căutați actualizări"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opțiuni Overlay Controale Video"; diff --git a/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings b/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings index 32b201c..c49d2b1 100644 --- a/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "YTLitePlus's version: %@"; "VERSION_CHECK" = "Tap to check for update!"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; diff --git a/lang/YTLitePlus.bundle/template.lproj/Localizable.strings b/lang/YTLitePlus.bundle/template.lproj/Localizable.strings index de571b5..ddb0f44 100644 --- a/lang/YTLitePlus.bundle/template.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/template.lproj/Localizable.strings @@ -17,6 +17,17 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "VERSION" = "YTLitePlus's version: %@"; "VERSION_CHECK" = "Tap to check for update!"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; diff --git a/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings b/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings index 3b58ba0..fe4b8b6 100644 --- a/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "YTLitePlus'ın sürümü: %@"; "VERSION_CHECK" = "Güncelleme için dokunun!"; +"COPY_SETTINGS" = "Ayarları Kopyala"; +"COPY_SETTINGS_DESC" = "Tüm mevcut ayarları panoya kopyala"; +"PASTE_SETTINGS" = "Ayarları Yapıştır"; +"PASTE_SETTINGS_DESC" = "Panodaki ayarları yapıştır ve uygula"; +"EXPORT_SETTINGS" = "Ayarları Dışa Aktar"; +"EXPORT_SETTINGS_DESC" = "Tüm mevcut ayarları bir .txt dosyasına dışa aktarır"; +"IMPORT_SETTINGS" = "Ayarları İçe Aktar"; +"IMPORT_SETTINGS_DESC" = "Ayarları içe aktarmak için basın (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "'Ayarları Kopyala' ve 'Ayarları Yapıştır' Düğmelerini Değiştir"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Düğmeleri 'Ayarları Dışa Aktar' ve 'Ayarları İçe Aktar' ile değiştirir"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Kontrol Seç."; diff --git a/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings b/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings index 5050e13..995ee22 100644 --- a/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings @@ -2,6 +2,17 @@ "VERSION" = "Phiên bản của CercubePlus: %@"; "VERSION_CHECK" = "Nhấn để kiểm tra cập nhật!"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video player options "VIDEO_PLAYER_OPTIONS" = "Tùy chọn trình phát video"; diff --git a/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings b/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings index 8176bc0..b78242d 100644 --- a/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings @@ -3,6 +3,17 @@ "VERSION" = "YTLitePlus 版本:%@"; "VERSION_CHECK" = "檢查更新"; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"EXPORT_SETTINGS" = "Export Settings"; +"EXPORT_SETTINGS_DESC" = "Exports all current settings into a .txt file"; +"IMPORT_SETTINGS" = "Import Settings"; +"IMPORT_SETTINGS_DESC" = "Press to import settings (.txt)"; +"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; +"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; + // Video controls overlay options "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "影片區覆蓋按鈕設定"; From 11a3e75b0de971727d6b085e3fd99a94c364e199 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:44:59 -0700 Subject: [PATCH 04/10] Default disable big mini player --- YTLitePlus.xm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/YTLitePlus.xm b/YTLitePlus.xm index d666a27..1c6e9af 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -561,6 +561,7 @@ BOOL isTabSelected = NO; } %end +/* // BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer %group Main %hook YTWatchMiniBarView @@ -585,6 +586,20 @@ BOOL isTabSelected = NO; } %end %end +*/ +// New Big YT Mini Player - @bhackel +%hook YTColdConfig +- (BOOL)enableIosFloatingMiniplayer { + // Modify if not on iPad + return (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad) ? IsEnabled(@"bigYTMiniPlayer_enabled") : %orig; +} +- (BOOL)enableIosFloatingMiniplayerRepositioning { + return (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad) ? IsEnabled(@"bigYTMiniPlayer_enabled") : %orig; +} +- (BOOL)enableIosFloatingMiniplayerResizing { + return (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad) ? IsEnabled(@"bigYTMiniPlayer_enabled") : %orig; +} +%end // App Settings Overlay Options %group gDisableAccountSection @@ -718,9 +733,9 @@ BOOL isTabSelected = NO; if (IsEnabled(@"iPhoneLayout_enabled")) { %init(giPhoneLayout); } - if (IsEnabled(@"bigYTMiniPlayer_enabled") && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) { - %init(Main); - } + // if (IsEnabled(@"bigYTMiniPlayer_enabled") && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) { + // %init(Main); + // } if (IsEnabled(@"hideVideoPlayerShadowOverlayButtons_enabled")) { %init(gHideVideoPlayerShadowOverlayButtons); } From c9875ec8b70a0863cbb958e0a580d893bb90ec55 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:26:19 -0700 Subject: [PATCH 05/10] Fix localization, fix copy/paste switch --- Source/Settings.xm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Settings.xm b/Source/Settings.xm index d809a9e..bb28324 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -114,7 +114,7 @@ static const NSInteger YTLiteSection = 789; accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { - return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/Balackburn/YTLitePlus/releases/latest"]]; + return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/YTLitePlus/YTLitePlus/releases/latest"]]; }]; [sectionItems addObject:main]; @@ -197,8 +197,6 @@ static const NSInteger YTLiteSection = 789; ]; [sectionItems addObject:pasteSettings]; - BASIC_SWITCH(LOC(@"REPLACE_COPY_AND_PASTE_BUTTONS"), LOC(@"REPLACE_COPY_AND_PASTE_BUTTONS_DESC"), @"switchCopyandPasteFunctionality_enabled"); - /* YTSettingsSectionItem *appIcon = [%c(YTSettingsSectionItem) itemWithTitle:LOC(@"CHANGE_APP_ICON") @@ -252,14 +250,14 @@ static const NSInteger YTLiteSection = 789; BASIC_SWITCH(LOC(@"HIDE_PRIVACY_SECTION"), LOC(@"APP_RESTART_DESC"), @"disablePrivacySection_enabled"), BASIC_SWITCH(LOC(@"HIDE_LIVECHAT_SECTION"), LOC(@"APP_RESTART_DESC"), @"disableLiveChatSection_enabled") ]; - YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"App Settings Overlay Options") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"APP_SETTINGS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; }]; [sectionItems addObject:appSettingsOverlayGroup]; # pragma mark - LowContrastMode - YTSettingsSectionItem *lowContrastModeSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"Low Contrast Mode") + YTSettingsSectionItem *lowContrastModeSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"LOW_CONTRAST_MODE") accessibilityIdentifier:nil detailTextBlock:^NSString *() { switch (contrastMode()) { @@ -283,7 +281,7 @@ static const NSInteger YTLiteSection = 789; return YES; }] ]; - YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"Low Contrast Mode") pickerSectionTitle:nil rows:rows selectedItemIndex:contrastMode() parentResponder:[self parentResponder]]; + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"LOW_CONTRAST_MODE") pickerSectionTitle:nil rows:rows selectedItemIndex:contrastMode() parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; }]; @@ -355,7 +353,7 @@ static const NSInteger YTLiteSection = 789; return YES; }] ]; - YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:@"Version Spoofer Picker" pickerSectionTitle:nil rows:rows selectedItemIndex:appVersionSpoofer() parentResponder:[self parentResponder]]; + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:@"VERSION_SPOOFER_TITLE" pickerSectionTitle:nil rows:rows selectedItemIndex:appVersionSpoofer() parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; }]; @@ -461,6 +459,7 @@ static const NSInteger YTLiteSection = 789; BASIC_SWITCH(LOC(@"HIDE_SPONSORBLOCK_BUTTON"), LOC(@"HIDE_SPONSORBLOCK_BUTTON_DESC"), @"hideSponsorBlockButton_enabled"), BASIC_SWITCH(LOC(@"HIDE_HOME_TAB"), LOC(@"HIDE_HOME_TAB_DESC"), @"hideHomeTab_enabled"), BASIC_SWITCH(LOC(@"FIX_CASTING"), LOC(@"FIX_CASTING_DESC"), @"fixCasting_enabled"), + BASIC_SWITCH(LOC(@"REPLACE_COPY_AND_PASTE_BUTTONS"), LOC(@"REPLACE_COPY_AND_PASTE_BUTTONS_DESC"), @"switchCopyandPasteFunctionality_enabled"), BASIC_SWITCH(LOC(@"ENABLE_FLEX"), LOC(@"ENABLE_FLEX_DESC"), @"flex_enabled"), BASIC_SWITCH(LOC(@"APP_VERSION_SPOOFER_LITE"), LOC(@"APP_VERSION_SPOOFER_LITE_DESC"), @"enableVersionSpoofer_enabled"), versionSpooferSection From 753d690b78f09654cdb25621c3f9001cafbb1abf Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:38:19 -0700 Subject: [PATCH 06/10] Hide autoplay mini preview --- Source/Settings.xm | 1 + YTLitePlus.xm | 10 ++++++++++ lang/YTLitePlus.bundle/ar.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/de.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/en.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/es.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/fr.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/ja.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/pt.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/ro.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/ru.lproj/Localizable.strings | 3 +++ .../template.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/tr.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/vi.lproj/Localizable.strings | 3 +++ lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings | 3 +++ 15 files changed, 50 insertions(+) diff --git a/Source/Settings.xm b/Source/Settings.xm index bb28324..ffbe941 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -230,6 +230,7 @@ static const NSInteger YTLiteSection = 789; 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"), + BASIC_SWITCH(LOC(@"HIDE_AUTOPLAY_MINI_PREVIEW"), LOC(@"HIDE_AUTOPLAY_MINI_PREVIEW_DESC"), @"hideAutoplayMiniPreview_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 1c6e9af..0798571 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -561,6 +561,16 @@ BOOL isTabSelected = NO; } %end +// Hide Autoplay Mini Preview - @bhackel +%hook YTAutonavPreviewView +- (void)didMoveToWindow { + %orig; + if (IsEnabled(@"hideAutoplayMiniPreview_enabled")) { + self.hidden = YES; + } +} +%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 9669e33..041d6a6 100644 --- a/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ar.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 41c62eb..eedad7c 100644 --- a/lang/YTLitePlus.bundle/de.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/de.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 1964212..ffbe59a 100644 --- a/lang/YTLitePlus.bundle/en.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/en.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 b5d54cd..ff13867 100644 --- a/lang/YTLitePlus.bundle/es.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/es.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 22fda27..a784e9b 100644 --- a/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/fr.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 9782bf5..6b67d73 100644 --- a/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ja.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "プレーヤー下のコメントプレビューを隠す"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "プレーヤーの下にあるコメントのプレビューを非表示にします。"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 210e80d..30133a2 100644 --- a/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/pt.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 52e72e6..49d413f 100644 --- a/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ro.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 c49d2b1..f29c9b2 100644 --- a/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/ru.lproj/Localizable.strings @@ -61,6 +61,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 ddb0f44..0d1e58d 100644 --- a/lang/YTLitePlus.bundle/template.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/template.lproj/Localizable.strings @@ -76,6 +76,9 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 fe4b8b6..8db663c 100644 --- a/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/tr.lproj/Localizable.strings @@ -61,6 +61,9 @@ "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."; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 995ee22..27fa187 100644 --- a/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/vi.lproj/Localizable.strings @@ -70,6 +70,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // 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 b78242d..bca5cf7 100644 --- a/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings +++ b/lang/YTLitePlus.bundle/zh_TW.lproj/Localizable.strings @@ -62,6 +62,9 @@ "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER" = "Hide Comment previews under player"; "HIDE_COMMENT_PREVIEWS_UNDER_PLAYER_DESC" = "Hide comment spoiler in comments button"; +"HIDE_AUTOPLAY_MINI_PREVIEW" = "Hide autoplay mini preview"; +"HIDE_AUTOPLAY_MINI_PREVIEW_DESC" = "Hide the small suggested video box near the title in fullscreen"; + // App settings overlay options "APP_SETTINGS_OVERLAY_OPTIONS" = "應用程式設定隱藏項目"; From ba13d1b987938bd47faecbc0c185a121958bcdc1 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:44:51 -0700 Subject: [PATCH 07/10] Live Chat OLED dark mode --- YTLitePlus.h | 8 ++++++++ YTLitePlus.xm | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/YTLitePlus.h b/YTLitePlus.h index f2de2c4..90611be 100644 --- a/YTLitePlus.h +++ b/YTLitePlus.h @@ -96,6 +96,14 @@ @property (nonatomic, assign, readwrite) BOOL enableSnapToChapter; @end +// Hide Autoplay Mini Preview - @bhackel +@interface YTAutonavPreviewView : UIView +@end + +// OLED Live Chat - @bhackel +@interface YTLUserDefaults : NSUserDefaults +@end + // Hide Home Tab - @bhackel @interface YTPivotBarViewController : UIViewController @property NSString *selectedPivotIdentifier; diff --git a/YTLitePlus.xm b/YTLitePlus.xm index 0798571..74c36b3 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -542,11 +542,10 @@ BOOL isTabSelected = NO; } %end - -// Hide the Comment Section Previews under the Video Player - @arichornlover %hook _ASDisplayView - (void)didMoveToWindow { %orig; + // Hide the Comment Section Previews under the Video Player - @arichornlover if ((IsEnabled(@"hidePreviewCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"])) { self.hidden = YES; self.opaque = YES; @@ -558,6 +557,12 @@ BOOL isTabSelected = NO; [self setNeedsLayout]; [self removeFromSuperview]; } + // Live chat OLED dark mode - @bhackel + if (([[YTLUserDefaults standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme + || [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1 // YTLitePlus OLED Theme + ) && [self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) { + self.backgroundColor = [UIColor blackColor]; + } } %end From 762cd8f61807bf41ebae90f60a1880ccb15cc268 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat, 10 Aug 2024 00:47:05 -0700 Subject: [PATCH 08/10] Remove YTLitePlus OLED Theme --- Source/Settings.xm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Source/Settings.xm b/Source/Settings.xm index ffbe941..93125ee 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -365,8 +365,6 @@ static const NSInteger YTLiteSection = 789; detailTextBlock:^NSString *() { switch (GetSelection(@"appTheme")) { case 1: - return LOC(@"OLED_DARK_THEME_2"); - case 2: return LOC(@"OLD_DARK_THEME"); case 0: default: @@ -380,13 +378,8 @@ static const NSInteger YTLiteSection = 789; [settingsViewController reloadData]; return YES; }], - [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"OLED_DARK_THEME") titleDescription:LOC(@"OLED_DARK_THEME_DESC") selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { - [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"appTheme"]; - [settingsViewController reloadData]; - return YES; - }], [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"OLD_DARK_THEME") titleDescription:LOC(@"OLD_DARK_THEME_DESC") selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { - [[NSUserDefaults standardUserDefaults] setInteger:2 forKey:@"appTheme"]; + [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"appTheme"]; [settingsViewController reloadData]; return YES; }], From f64aab1b586f17cebab545ba2826735e0300ba73 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat, 10 Aug 2024 02:19:23 -0700 Subject: [PATCH 09/10] Fix build error --- YTLitePlus.xm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YTLitePlus.xm b/YTLitePlus.xm index 74c36b3..a799e20 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -558,7 +558,7 @@ BOOL isTabSelected = NO; [self removeFromSuperview]; } // Live chat OLED dark mode - @bhackel - if (([[YTLUserDefaults standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme + if (([[%c(YTLUserDefaults) standardUserDefaults] boolForKey:@"oledTheme"] // YTLite OLED Theme || [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1 // YTLitePlus OLED Theme ) && [self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) { self.backgroundColor = [UIColor blackColor]; From 1a9758770dc5c1946bfef4dd5969e5c3d6e3973b Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat, 10 Aug 2024 02:34:42 -0700 Subject: [PATCH 10/10] Fix bugs --- Source/Themes.xm | 11 +++-------- YTLitePlus.xm | 9 ++++++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Source/Themes.xm b/Source/Themes.xm index 75123db..4ea44b7 100644 --- a/Source/Themes.xm +++ b/Source/Themes.xm @@ -6,11 +6,8 @@ static BOOL IsEnabled(NSString *key) { static BOOL isDarkMode() { return ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1); } -static BOOL oledDarkTheme() { - return ([[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1); -} static BOOL oldDarkTheme() { - return ([[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 2); + return ([[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1); } // Themes.xm - Theme Options @@ -402,7 +399,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha: %end // OLED dark mode by @BandarHL and modified by @arichorn -UIColor* raisedColor = [UIColor blackColor]; +/* %group gOLED %hook YTCommonColorPalette - (UIColor *)background1 { @@ -788,6 +785,7 @@ UIColor* raisedColor = [UIColor blackColor]; } %end %end +*/ // OLED keyboard by @ichitaso <3 - http://gist.github.com/ichitaso/935100fd53a26f18a9060f7195a1be0e %group gOLEDKB @@ -837,9 +835,6 @@ UIColor* raisedColor = [UIColor blackColor]; if (IsEnabled(@"oledKeyBoard_enabled")) { %init(gOLEDKB); } - if (oledDarkTheme()) { - %init(gOLED); - } if (oldDarkTheme()) { %init(gOldDarkTheme); } diff --git a/YTLitePlus.xm b/YTLitePlus.xm index a799e20..bd0938b 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -568,12 +568,19 @@ BOOL isTabSelected = NO; // Hide Autoplay Mini Preview - @bhackel %hook YTAutonavPreviewView -- (void)didMoveToWindow { +- (void)layoutSubviews { %orig; if (IsEnabled(@"hideAutoplayMiniPreview_enabled")) { self.hidden = YES; } } +- (void)setHidden:(BOOL)arg1 { + if (IsEnabled(@"hideAutoplayMiniPreview_enabled")) { + %orig(YES); + } else { + %orig(arg1); + } +} %end /*