formating, remove old code, update IAmYouTube
This commit is contained in:
+10
-43
@@ -12,7 +12,6 @@
|
|||||||
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
|
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
|
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTColorPalette.h"
|
|
||||||
#import "Tweaks/YouTubeHeader/ASCollectionView.h"
|
#import "Tweaks/YouTubeHeader/ASCollectionView.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTPlayerOverlay.h"
|
#import "Tweaks/YouTubeHeader/YTPlayerOverlay.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTPlayerOverlayProvider.h"
|
#import "Tweaks/YouTubeHeader/YTPlayerOverlayProvider.h"
|
||||||
@@ -248,7 +247,6 @@ BOOL hidePaidPromotionCard() {
|
|||||||
// YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
|
// YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
|
||||||
%hook YTColdConfig
|
%hook YTColdConfig
|
||||||
- (BOOL)respectDeviceCaptionSetting { return NO; }
|
- (BOOL)respectDeviceCaptionSetting { return NO; }
|
||||||
- (BOOL)shouldUseAppThemeSetting { return YES; } // v16.xx
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
||||||
@@ -287,10 +285,6 @@ BOOL hidePaidPromotionCard() {
|
|||||||
- (void)setUserInteractionEnabled:(BOOL)enabled { %orig(YES); }
|
- (void)setUserInteractionEnabled:(BOOL)enabled { %orig(YES); }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTReelPlayerViewControllerSub // v16.42.3 - @level3tjg: https://reddit.com/r/jailbreak/comments/v29yvk/_/iasl1l0/
|
|
||||||
- (BOOL)shouldEnablePlayerBar { return YES; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
// Workaround for issue #54
|
// Workaround for issue #54
|
||||||
%hook YTMainAppVideoPlayerOverlayViewController
|
%hook YTMainAppVideoPlayerOverlayViewController
|
||||||
- (void)updateRelatedVideos {
|
- (void)updateRelatedVideos {
|
||||||
@@ -336,8 +330,7 @@ BOOL hidePaidPromotionCard() {
|
|||||||
[uYouButton
|
[uYouButton
|
||||||
setTitleTypeKind:MSHookIvar<NSInteger>(topButton, "_typeKind")
|
setTitleTypeKind:MSHookIvar<NSInteger>(topButton, "_typeKind")
|
||||||
typeVariant:MSHookIvar<NSInteger>(topButton, "_typeVariant")];
|
typeVariant:MSHookIvar<NSInteger>(topButton, "_typeVariant")];
|
||||||
uYouButton.applyRightSideLayoutImageSize =
|
uYouButton.applyRightSideLayoutImageSize = topButton.applyRightSideLayoutImageSize;
|
||||||
topButton.applyRightSideLayoutImageSize;
|
|
||||||
uYouButton.buttonImageTitlePadding = topButton.buttonImageTitlePadding;
|
uYouButton.buttonImageTitlePadding = topButton.buttonImageTitlePadding;
|
||||||
uYouButton.buttonLayoutStyle = topButton.buttonLayoutStyle;
|
uYouButton.buttonLayoutStyle = topButton.buttonLayoutStyle;
|
||||||
uYouButton.sizeWithPaddingAndInsets = topButton.sizeWithPaddingAndInsets;
|
uYouButton.sizeWithPaddingAndInsets = topButton.sizeWithPaddingAndInsets;
|
||||||
@@ -441,6 +434,14 @@ BOOL hidePaidPromotionCard() {
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook APMAEU
|
||||||
|
+ (BOOL)isFAS { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook GULAppEnvironmentUtil
|
||||||
|
+ (BOOL)isFromAppStore { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
%hook NSBundle
|
%hook NSBundle
|
||||||
- (NSString *)bundleIdentifier {
|
- (NSString *)bundleIdentifier {
|
||||||
NSArray *address = [NSThread callStackReturnAddresses];
|
NSArray *address = [NSThread callStackReturnAddresses];
|
||||||
@@ -543,39 +544,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTColorPalette // v16.42.3
|
|
||||||
- (UIColor *)brandBackgroundSolid {
|
|
||||||
if (self.pageStyle == 1) {
|
|
||||||
return [UIColor blackColor];
|
|
||||||
}
|
|
||||||
return %orig;
|
|
||||||
}
|
|
||||||
- (UIColor *)brandBackgroundPrimary {
|
|
||||||
if (self.pageStyle == 1) {
|
|
||||||
return [UIColor blackColor];
|
|
||||||
}
|
|
||||||
return %orig;
|
|
||||||
}
|
|
||||||
- (UIColor *)brandBackgroundSecondary {
|
|
||||||
if (self.pageStyle == 1) {
|
|
||||||
return [[UIColor blackColor] colorWithAlphaComponent:0.9];
|
|
||||||
}
|
|
||||||
return %orig;
|
|
||||||
}
|
|
||||||
- (UIColor *)staticBrandBlack {
|
|
||||||
if (self.pageStyle == 1) {
|
|
||||||
return [UIColor blackColor];
|
|
||||||
}
|
|
||||||
return %orig;
|
|
||||||
}
|
|
||||||
- (UIColor *)generalBackgroundA {
|
|
||||||
if (self.pageStyle == 1) {
|
|
||||||
return [UIColor blackColor];
|
|
||||||
}
|
|
||||||
return %orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
// Account view controller
|
// Account view controller
|
||||||
%hook YTAccountPanelBodyViewController
|
%hook YTAccountPanelBodyViewController
|
||||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
@@ -601,7 +569,7 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) {
|
if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) {
|
||||||
self.superview.backgroundColor = [UIColor clearColor];
|
self.superview.backgroundColor = [UIColor blackColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
@@ -726,7 +694,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor clearColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor clearColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = [UIColor blackColor]; }
|
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = [UIColor blackColor]; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
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]; }
|
||||||
|
|||||||
Reference in New Issue
Block a user