From 810aca2f162b13f764c20e58e8b122dacf474ebd Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:06:07 -0700 Subject: [PATCH] Disable warning popup --- YTLitePlus.h | 4 ++++ YTLitePlus.xm | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/YTLitePlus.h b/YTLitePlus.h index 247af9e..1c3ead2 100644 --- a/YTLitePlus.h +++ b/YTLitePlus.h @@ -130,6 +130,10 @@ typedef NS_ENUM(NSUInteger, GestureSection) { @property (nonatomic, assign, readwrite) BOOL enableSnapToChapter; @end +// Hide YouTube Plus incompatibility warning popup - @bhackel +@interface HelperVC : UIViewController +@end + // Hide Autoplay Mini Preview - @bhackel @interface YTAutonavPreviewView : UIView @end diff --git a/YTLitePlus.xm b/YTLitePlus.xm index 093b70d..aa8b0bc 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -110,12 +110,8 @@ BOOL isSelf() { } %end -# pragma mark - Hide SponsorBlock Button +// Hide SponsorBlock Button in navigation bar %hook YTRightNavigationButtons -- (void)didMoveToWindow { - %orig; -} - - (void)layoutSubviews { %orig; if (IsEnabled(@"hideSponsorBlockButton_enabled")) { @@ -174,6 +170,18 @@ BOOL isSelf() { %end %end +// Disable YouTube Plus incompatibility warning popup - @bhackel +%hook HelperVC +- (void)viewDidLoad { + %orig; + // Check if it responds to the selector riskButtonTapped + if ([self respondsToSelector:@selector(riskButtonTapped)]) { + // Call the selector riskButtonTapped + [self performSelector:@selector(riskButtonTapped)]; + } +} +%end + // A/B flags %hook YTColdConfig