mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Remove YTNoTracking Tweak
The YTNoTracking Tweak doesn’t work and is marked as Deprecated now.
This commit is contained in:
parent
2f28cec0d4
commit
114eb6c4b3
1 changed files with 0 additions and 21 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue