mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 07:41:59 +00:00
This commit is contained in:
parent
3c9d59f77b
commit
a0fe2f8cc3
1 changed files with 25 additions and 45 deletions
70
uYouPlus.xm
70
uYouPlus.xm
|
|
@ -269,31 +269,7 @@ static BOOL didFinishLaunching;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// Fix "Google couldn't confirm this attempt to sign in is safe. If you think this is a mistake, you can close and try again to sign in" - qnblackcat/uYouPlus#420
|
// Hide YouTube annoying banner in Home page? - @MiRO92 - YTNoShorts: https://github.com/MiRO92/YTNoShorts
|
||||||
// Thanks to @AhmedBafkir and @kkirby - https://github.com/qnblackcat/uYouPlus/discussions/447#discussioncomment-3672881
|
|
||||||
%group gFixGoogleSignIn
|
|
||||||
%hook SSORPCService
|
|
||||||
+ (id)URLFromURL:(id)arg1 withAdditionalFragmentParameters:(NSDictionary *)arg2 {
|
|
||||||
NSURL *orig = %orig;
|
|
||||||
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:orig resolvingAgainstBaseURL:NO];
|
|
||||||
NSMutableArray *newQueryItems = [urlComponents.queryItems mutableCopy];
|
|
||||||
for (NSURLQueryItem *queryItem in urlComponents.queryItems) {
|
|
||||||
if ([queryItem.name isEqualToString:@"system_version"]
|
|
||||||
|| [queryItem.name isEqualToString:@"app_version"]
|
|
||||||
|| [queryItem.name isEqualToString:@"kdlc"]
|
|
||||||
|| [queryItem.name isEqualToString:@"kss"]
|
|
||||||
|| [queryItem.name isEqualToString:@"lib_ver"]
|
|
||||||
|| [queryItem.name isEqualToString:@"device_model"]) {
|
|
||||||
[newQueryItems removeObject:queryItem];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
urlComponents.queryItems = [newQueryItems copy];
|
|
||||||
return urlComponents.URL;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
%end
|
|
||||||
|
|
||||||
// Hide YouTube Shorts banner in Home page? - @MiRO92 - YTNoShorts: https://github.com/MiRO92/YTNoShorts
|
|
||||||
%hook YTAsyncCollectionView
|
%hook YTAsyncCollectionView
|
||||||
- (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
UICollectionViewCell *cell = %orig;
|
UICollectionViewCell *cell = %orig;
|
||||||
|
|
@ -307,7 +283,6 @@ static BOOL didFinishLaunching;
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
|
|
||||||
%new
|
%new
|
||||||
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
|
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
|
||||||
|
|
@ -376,6 +351,13 @@ static BOOL didFinishLaunching;
|
||||||
return YT_NAME;
|
return YT_NAME;
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
|
// Fix Google Sign in by @PoomSmart and @level3tjg (qnblackcat/uYouPlus#684)
|
||||||
|
- (NSDictionary *)infoDictionary {
|
||||||
|
NSMutableDictionary *info = %orig.mutableCopy;
|
||||||
|
NSString *altBundleIdentifier = info[@"ALTBundleIdentifier"];
|
||||||
|
if (altBundleIdentifier) info[@"CFBundleIdentifier"] = altBundleIdentifier;
|
||||||
|
return info;
|
||||||
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// YTMiniPlayerEnabler: https://github.com/level3tjg/YTMiniplayerEnabler/
|
// YTMiniPlayerEnabler: https://github.com/level3tjg/YTMiniplayerEnabler/
|
||||||
|
|
@ -463,11 +445,6 @@ static BOOL didFinishLaunching;
|
||||||
- (BOOL)respectDeviceCaptionSetting { return NO; } // YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
|
- (BOOL)respectDeviceCaptionSetting { return NO; } // YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
|
||||||
- (BOOL)isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES; } // Swipe right to dismiss the right panel in fullscreen mode
|
- (BOOL)isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES; } // Swipe right to dismiss the right panel in fullscreen mode
|
||||||
- (BOOL)mainAppCoreClientIosTransientVisualGlitchInPivotBarFix { return NO; } // Fix uYou's label glitching - qnblackcat/uYouPlus#552
|
- (BOOL)mainAppCoreClientIosTransientVisualGlitchInPivotBarFix { return NO; } // Fix uYou's label glitching - qnblackcat/uYouPlus#552
|
||||||
- (BOOL)enableSwipeToRemoveInPlaylistWatchEp { return YES; } // Enable swipe right to remove video in Playlist.
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTHotConfig
|
|
||||||
- (BOOL)iosEnableShortsPlayerSplitViewController { return NO; } // Fix uYou's button missing in Shorts: qnblackcat/uYouPlus#800
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
||||||
|
|
@ -951,10 +928,18 @@ void DEMC_centerRenderingView() {
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook YTHotConfig
|
||||||
|
- (BOOL)iosEnableShortsPlayerSplitViewController {
|
||||||
|
return IsEnabled(@"hideuYouShortsDownloadButton_enabled") ? YES : NO;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
if ((IsEnabled(@"hideBuySuperThanks_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.suggested_action"])) { self.hidden = YES; }
|
if ((IsEnabled(@"hideBuySuperThanks_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.suggested_action"])) {
|
||||||
|
self.hidden = YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
@ -1027,16 +1012,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// Account view controller
|
|
||||||
// %hook YTAccountPanelBodyViewController
|
|
||||||
// - (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
|
||||||
// if (pageStyle == 1) {
|
|
||||||
// return [UIColor greenColor];
|
|
||||||
// }
|
|
||||||
// return %orig;
|
|
||||||
// }
|
|
||||||
// %end
|
|
||||||
|
|
||||||
// Explore
|
// Explore
|
||||||
%hook ASScrollView
|
%hook ASScrollView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
|
|
@ -1189,6 +1164,7 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
@ -1325,6 +1301,13 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
||||||
%end
|
%end
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// YT startup animation
|
||||||
|
%hook YTColdConfig
|
||||||
|
- (BOOL)mainAppCoreClientIosEnableStartupAnimation {
|
||||||
|
return IsEnabled(@"ytStartupAnimation_enabled") ? YES : NO;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
# pragma mark - ctor
|
# pragma mark - ctor
|
||||||
%ctor {
|
%ctor {
|
||||||
// Load uYou first so its functions are available for hooks.
|
// Load uYou first so its functions are available for hooks.
|
||||||
|
|
@ -1334,9 +1317,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
||||||
if (@available(iOS 16, *)) {
|
if (@available(iOS 16, *)) {
|
||||||
%init(iOS16);
|
%init(iOS16);
|
||||||
}
|
}
|
||||||
if (!IsEnabled(@"fixGoogleSignIn_enabled")) {
|
|
||||||
%init(gFixGoogleSignIn);
|
|
||||||
}
|
|
||||||
if (IsEnabled(@"reExplore_enabled")) {
|
if (IsEnabled(@"reExplore_enabled")) {
|
||||||
%init(gReExplore);
|
%init(gReExplore);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue