From 114eb6c4b3f24a955bcd757d70cddcfa7e74928f Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:52:38 -0500 Subject: [PATCH] Remove YTNoTracking Tweak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The YTNoTracking Tweak doesn’t work and is marked as Deprecated now. --- Sources/uYouPlus.xm | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index c4b4e7e..9291d9c 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -551,27 +551,6 @@ NSData *cellDividerData; - (BOOL)enablePlayerBarForVerticalVideoWhenControlsHiddenInFullscreen { return YES; } %end -// YTNoTracking - @arichornlover - https://github.com/arichornlover/YTNoTracking/ -%hook UIPasteboard -- (void)setString:(NSString *)string { - // Check if the shared string is a YouTube URL - if ([string containsString:@"youtu"]) { - NSError *error = NULL; - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"youtu\\.be\\/(\\w+)" options:NSRegularExpressionCaseInsensitive error:&error]; - NSArray *matches = [regex matchesInString:string options:0 range:NSMakeRange(0, [string length])]; - for (NSTextCheckingResult *match in matches) { - NSRange videoIDRange = [match rangeAtIndex:1]; - NSString *videoID = [string substringWithRange:videoIDRange]; - NSRange timeRange = [string rangeOfString:@"t=" options:NSBackwardsSearch]; - NSString *sanitizedURL = [NSString stringWithFormat:@"https://youtu.be/%@%@", videoID, [string substringFromIndex:timeRange.location]]; - %orig(sanitizedURL); - return; - } - } - %orig(string); -} -%end - // YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo %hook YTMainAppVideoPlayerOverlayViewController - (void)setPaidContentWithPlayerData:(id)data {