mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Improvements
This commit is contained in:
parent
80f45d8c97
commit
83ed531380
1 changed files with 27 additions and 29 deletions
56
uYouPlus.xm
56
uYouPlus.xm
|
|
@ -61,24 +61,6 @@ static BOOL IsEnabled(NSString *key) {
|
|||
}
|
||||
%end
|
||||
|
||||
// Enable Share Button / Enable Save to Playlist Button
|
||||
%hook YTMainAppControlsOverlayView
|
||||
- (void)setShareButtonAvailable:(BOOL)arg1 {
|
||||
if (IsEnabled(@"enableShareButton_enabled")) {
|
||||
%orig(YES);
|
||||
} else {
|
||||
%orig(NO);
|
||||
}
|
||||
}
|
||||
- (void)setAddToButtonAvailable:(BOOL)arg1 {
|
||||
if (IsEnabled(@"enableSaveToButton_enabled")) {
|
||||
%orig(YES);
|
||||
} else {
|
||||
%orig(NO);
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
# pragma mark - YouTube's patches
|
||||
%hook YTHotConfig
|
||||
- (BOOL)disableAfmaIdfaCollection { return NO; }
|
||||
|
|
@ -491,6 +473,15 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
%end
|
||||
%end
|
||||
|
||||
// Hide Subscriptions Notification Badge
|
||||
%group gHideSubscriptionsNotificationBadge
|
||||
%hook YTPivotBarIndicatorView
|
||||
- (void)removeFromSuperview {
|
||||
%orig(YES);
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
|
||||
%group Main
|
||||
%hook YTWatchMiniBarView
|
||||
|
|
@ -612,7 +603,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
%end
|
||||
|
||||
// Video Controls Overlay Options
|
||||
// Hide CC / Autoplay switch
|
||||
// Hide CC / Autoplay switch / Enable Share Button / Enable Save to Playlist Button
|
||||
%hook YTMainAppControlsOverlayView
|
||||
- (void)setClosedCaptionsOrSubtitlesButtonAvailable:(BOOL)arg1 { // hide CC button
|
||||
return IsEnabled(@"hideCC_enabled") ? %orig(NO) : %orig;
|
||||
|
|
@ -621,6 +612,20 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
if (IsEnabled(@"hideAutoplaySwitch_enabled")) {}
|
||||
else { return %orig; }
|
||||
}
|
||||
- (void)setShareButtonAvailable:(BOOL)arg1 {
|
||||
if (IsEnabled(@"enableShareButton_enabled")) {
|
||||
%orig(YES);
|
||||
} else {
|
||||
%orig(NO);
|
||||
}
|
||||
}
|
||||
- (void)setAddToButtonAvailable:(BOOL)arg1 {
|
||||
if (IsEnabled(@"enableSaveToButton_enabled")) {
|
||||
%orig(YES);
|
||||
} else {
|
||||
%orig(NO);
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide HUD Messages
|
||||
|
|
@ -811,16 +816,6 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
%end
|
||||
%end
|
||||
|
||||
%hook YTPivotBarIndicatorView
|
||||
- (void)removeFromSuperview {
|
||||
if (IsEnabled(@"hideSubscriptionsNotificationBadge_enabled")) {
|
||||
%orig(YES);
|
||||
} else {
|
||||
%orig(NO);
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
// YT startup animation
|
||||
%hook YTColdConfig
|
||||
- (BOOL)mainAppCoreClientIosEnableStartupAnimation {
|
||||
|
|
@ -840,6 +835,9 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
if (IsEnabled(@"bigYTMiniPlayer_enabled") && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
||||
%init(Main);
|
||||
}
|
||||
if (IsEnabled(@"hideSubscriptionsNotificationBadge_enabled")) {
|
||||
%init(gHideSubscriptionsNotificationBadge);
|
||||
}
|
||||
if (IsEnabled(@"hidePreviousAndNextButton_enabled")) {
|
||||
%init(gHidePreviousAndNextButton);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue