mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-21 10:38:45 -04:00
Compare commits
30 Commits
85470b596a
...
8c89858dc0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8c89858dc0 | ||
![]() |
8cc0ecc25b | ||
![]() |
73fbef60b9 | ||
![]() |
dcb74059a4 | ||
![]() |
f247932b4c | ||
![]() |
a0e27d1706 | ||
![]() |
2faeaeb529 | ||
![]() |
596a409d61 | ||
![]() |
ccc4ab55a3 | ||
![]() |
1bc5e70b24 | ||
![]() |
578a5dfd5f | ||
![]() |
0ad65e8cc2 | ||
![]() |
95500ab0f2 | ||
![]() |
40eec73776 | ||
![]() |
a2bcc4dcc4 | ||
![]() |
7a63fad293 | ||
![]() |
9086575975 | ||
![]() |
317b3434c8 | ||
![]() |
31f9e30d7d | ||
![]() |
d53f0181ac | ||
![]() |
136149c586 | ||
![]() |
30925e6464 | ||
![]() |
2259fa5d67 | ||
![]() |
87202b70fb | ||
![]() |
9c761884af | ||
![]() |
9841105ef7 | ||
![]() |
f2c6c6669c | ||
![]() |
e18a3d045d | ||
![]() |
4b08bf4d7c | ||
![]() |
b7480a7a98 |
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -48,7 +48,7 @@
|
|||||||
url = https://github.com/PoomSmart/YouQuality
|
url = https://github.com/PoomSmart/YouQuality
|
||||||
[submodule "Tweaks/Return-YouTube-Dislikes"]
|
[submodule "Tweaks/Return-YouTube-Dislikes"]
|
||||||
path = Tweaks/Return-YouTube-Dislikes
|
path = Tweaks/Return-YouTube-Dislikes
|
||||||
url = https://github.com/arichornloverALT/Return-YouTube-Dislikes.git
|
url = https://github.com/PoomSmart/Return-YouTube-Dislikes.git
|
||||||
[submodule "Tweaks/YTHeaders"]
|
[submodule "Tweaks/YTHeaders"]
|
||||||
path = Tweaks/YTHeaders
|
path = Tweaks/YTHeaders
|
||||||
url = https://github.com/therealFoxster/YTHeaders
|
url = https://github.com/therealFoxster/YTHeaders
|
||||||
|
@@ -1,492 +1,511 @@
|
|||||||
#import "../YTLitePlus.h"
|
#import "../YTLitePlus.h"
|
||||||
|
|
||||||
// Low Contrast Mode - @arichornlover
|
// Color Configuration
|
||||||
static int contrastMode() {
|
static UIColor *lcmHexColor = nil;
|
||||||
|
static UIColor *const kLowContrastColor = [UIColor colorWithRed:0.56 green:0.56 blue:0.56 alpha:1.0];
|
||||||
|
static UIColor *const kDefaultTextColor = [UIColor whiteColor];
|
||||||
|
|
||||||
|
// Utility Functions
|
||||||
|
static inline int contrastMode() {
|
||||||
return [[NSUserDefaults standardUserDefaults] integerForKey:@"lcm"];
|
return [[NSUserDefaults standardUserDefaults] integerForKey:@"lcm"];
|
||||||
}
|
}
|
||||||
static BOOL lowContrastMode() {
|
|
||||||
return IsEnabled(@"lowContrastMode_enabled") && contrastMode() == 0;
|
static inline BOOL lowContrastMode() {
|
||||||
}
|
return IS_ENABLED(@"lowContrastMode_enabled") && contrastMode() == 0;
|
||||||
static BOOL customContrastMode() {
|
|
||||||
return IsEnabled(@"lowContrastMode_enabled") && contrastMode() == 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIColor *lcmHexColor;
|
static inline BOOL customContrastMode() {
|
||||||
|
return IS_ENABLED(@"lowContrastMode_enabled") && contrastMode() == 1;
|
||||||
|
}
|
||||||
|
|
||||||
%group gLowContrastMode // Low Contrast Mode v1.6.1 (Compatible with only YouTube v17.33.2-v18.34.5)
|
// static inline UIColor *activeColor() {
|
||||||
|
// return customContrastMode() && lcmHexColor ? lcmHexColor : kLowContrastColor;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Low Contrast Mode v1.7.1.1 (Compatible with only YouTube v19.01.1-v20.21.6)
|
||||||
|
%group gLowContrastMode
|
||||||
%hook UIColor
|
%hook UIColor
|
||||||
+ (UIColor *)whiteColor { // Dark Theme Color
|
+ (UIColor *)colorNamed:(NSString *)name {
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
NSArray<NSString *> *targetColors = @[
|
||||||
}
|
@"whiteColor", @"lightTextColor", @"lightGrayColor", @"ychGrey7",
|
||||||
+ (UIColor *)lightTextColor {
|
@"skt_chipBackgroundColor", @"placeholderTextColor", @"systemLightGrayColor",
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
@"systemExtraLightGrayColor", @"labelColor", @"secondaryLabelColor",
|
||||||
}
|
@"tertiaryLabelColor", @"quaternaryLabelColor"
|
||||||
+ (UIColor *)placeholderTextColor {
|
];
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
return [targetColors containsObject:name] ? kLowContrastColor : %orig;
|
||||||
}
|
|
||||||
+ (UIColor *)labelColor {
|
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
|
||||||
}
|
|
||||||
+ (UIColor *)secondaryLabelColor {
|
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
|
||||||
}
|
|
||||||
+ (UIColor *)tertiaryLabelColor {
|
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
|
||||||
}
|
|
||||||
+ (UIColor *)quaternaryLabelColor {
|
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (UIColor *)whiteColor { return kLowContrastColor; }
|
||||||
|
+ (UIColor *)lightTextColor { return kLowContrastColor; }
|
||||||
|
+ (UIColor *)lightGrayColor { return kLowContrastColor; }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTCommonColorPalette
|
%hook YTCommonColorPalette
|
||||||
- (UIColor *)textPrimary {
|
- (UIColor *)textPrimary {
|
||||||
NSLog(@"LowContrastMode: textPrimary called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)textSecondary {
|
- (UIColor *)textSecondary {
|
||||||
NSLog(@"LowContrastMode: textSecondary called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayTextPrimary {
|
- (UIColor *)overlayTextPrimary {
|
||||||
NSLog(@"LowContrastMode: overlayTextPrimary called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayTextSecondary {
|
- (UIColor *)overlayTextSecondary {
|
||||||
NSLog(@"LowContrastMode: overlayTextSecondary called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)iconActive {
|
- (UIColor *)iconActive {
|
||||||
NSLog(@"LowContrastMode: iconActive called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)iconActiveOther {
|
- (UIColor *)iconActiveOther {
|
||||||
NSLog(@"LowContrastMode: iconActiveOther called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)brandIconActive {
|
- (UIColor *)brandIconActive {
|
||||||
NSLog(@"LowContrastMode: brandIconActive called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)staticBrandWhite {
|
- (UIColor *)staticBrandWhite {
|
||||||
NSLog(@"LowContrastMode: staticBrandWhite called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayIconActiveOther {
|
- (UIColor *)overlayIconActiveOther {
|
||||||
NSLog(@"LowContrastMode: overlayIconActiveOther called");
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayIconInactive {
|
- (UIColor *)overlayIconInactive {
|
||||||
NSLog(@"LowContrastMode: overlayIconInactive called");
|
return self.pageStyle == 1 ? [kDefaultTextColor colorWithAlphaComponent:0.7] : %orig;
|
||||||
return self.pageStyle == 1 ? [[UIColor whiteColor] colorWithAlphaComponent:0.7] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayIconDisabled {
|
- (UIColor *)overlayIconDisabled {
|
||||||
NSLog(@"LowContrastMode: overlayIconDisabled called");
|
return self.pageStyle == 1 ? [kDefaultTextColor colorWithAlphaComponent:0.3] : %orig;
|
||||||
return self.pageStyle == 1 ? [[UIColor whiteColor] colorWithAlphaComponent:0.3] : %orig;
|
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayFilledButtonActive {
|
- (UIColor *)overlayFilledButtonActive {
|
||||||
NSLog(@"LowContrastMode: overlayFilledButtonActive called");
|
return self.pageStyle == 1 ? [kDefaultTextColor colorWithAlphaComponent:0.2] : %orig;
|
||||||
return self.pageStyle == 1 ? [[UIColor whiteColor] colorWithAlphaComponent:0.2] : %orig;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTColor
|
%hook YTColor
|
||||||
+ (UIColor *)white2 {
|
+ (BOOL)darkerPaletteTextColorEnabled { return NO; }
|
||||||
return [UIColor whiteColor];
|
+ (UIColor *)white1 { return kLowContrastColor; }
|
||||||
}
|
+ (UIColor *)white2 { return kLowContrastColor; }
|
||||||
+ (UIColor *)white3 {
|
+ (UIColor *)white3 { return kLowContrastColor; }
|
||||||
return [UIColor whiteColor];
|
+ (UIColor *)white4 { return kLowContrastColor; }
|
||||||
}
|
+ (UIColor *)white5 { return kLowContrastColor; }
|
||||||
+ (UIColor *)white4 {
|
+ (UIColor *)grey1 { return kLowContrastColor; }
|
||||||
return [UIColor whiteColor];
|
+ (UIColor *)grey2 { return kLowContrastColor; }
|
||||||
}
|
|
||||||
+ (UIColor *)white5 {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig;
|
%orig;
|
||||||
|
NSArray<NSString *> *targetLabels = @[@"connect account", @"Thanks", @"Save to playlist", @"Report"];
|
||||||
for (UIView *subview in self.subviews) {
|
for (UIView *subview in self.subviews) {
|
||||||
if ([subview.accessibilityLabel isEqualToString:@"connect account"]) {
|
if ([targetLabels containsObject:subview.accessibilityLabel]) {
|
||||||
subview.backgroundColor = [UIColor whiteColor];
|
subview.backgroundColor = kLowContrastColor;
|
||||||
if ([subview isKindOfClass:[UILabel class]]) {
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
UILabel *label = (UILabel *)subview;
|
((UILabel *)subview).textColor = [UIColor blackColor];
|
||||||
label.textColor = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
} else if ([subview.accessibilityLabel isEqualToString:@"Thanks"]) {
|
|
||||||
subview.backgroundColor = [UIColor whiteColor];
|
|
||||||
if ([subview isKindOfClass:[UILabel class]]) {
|
|
||||||
UILabel *label = (UILabel *)subview;
|
|
||||||
label.textColor = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
} else if ([subview.accessibilityLabel isEqualToString:@"Save to playlist"]) {
|
|
||||||
subview.backgroundColor = [UIColor whiteColor];
|
|
||||||
if ([subview isKindOfClass:[UILabel class]]) {
|
|
||||||
UILabel *label = (UILabel *)subview;
|
|
||||||
label.textColor = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
} else if ([subview.accessibilityLabel isEqualToString:@"Report"]) {
|
|
||||||
subview.backgroundColor = [UIColor whiteColor];
|
|
||||||
if ([subview isKindOfClass:[UILabel class]]) {
|
|
||||||
UILabel *label = (UILabel *)subview;
|
|
||||||
label.textColor = [UIColor blackColor];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook QTMColorGroup
|
%hook QTMColorGroup
|
||||||
- (UIColor *)tint100 {
|
- (UIColor *)tint100 { return kDefaultTextColor; }
|
||||||
return [UIColor whiteColor];
|
- (UIColor *)tint300 { return kDefaultTextColor; }
|
||||||
}
|
- (UIColor *)tint500 { return kDefaultTextColor; }
|
||||||
- (UIColor *)tint300 {
|
- (UIColor *)tint700 { return kDefaultTextColor; }
|
||||||
return [UIColor whiteColor];
|
- (UIColor *)accent200 { return kDefaultTextColor; }
|
||||||
}
|
- (UIColor *)accent400 { return kDefaultTextColor; }
|
||||||
- (UIColor *)bodyTextColor {
|
- (UIColor *)accentColor { return kDefaultTextColor; }
|
||||||
return [UIColor whiteColor];
|
- (UIColor *)brightAccentColor { return kDefaultTextColor; }
|
||||||
}
|
- (UIColor *)regularColor { return kDefaultTextColor; }
|
||||||
- (UIColor *)bodyTextColorOnLighterColor {
|
- (UIColor *)darkerColor { return kDefaultTextColor; }
|
||||||
return [UIColor whiteColor];
|
- (UIColor *)bodyTextColor { return kDefaultTextColor; }
|
||||||
}
|
- (UIColor *)lightBodyTextColor { return kDefaultTextColor; }
|
||||||
- (UIColor *)bodyTextColorOnRegularColor {
|
- (UIColor *)bodyTextColorOnRegularColor { return kDefaultTextColor; }
|
||||||
return [UIColor whiteColor];
|
- (UIColor *)bodyTextColorOnLighterColor { return kDefaultTextColor; }
|
||||||
}
|
- (UIColor *)bodyTextColorOnDarkerColor { return kDefaultTextColor; }
|
||||||
- (UIColor *)bodyTextColorOnDarkerColor {
|
- (UIColor *)bodyTextColorOnAccentColor { return kDefaultTextColor; }
|
||||||
return [UIColor whiteColor];
|
- (UIColor *)buttonBackgroundColor { return kDefaultTextColor; }
|
||||||
}
|
- (UIColor *)Color { return kDefaultTextColor; }
|
||||||
- (UIColor *)bodyTextColorOnAccentColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)bodyTextColorOnOnBrightAccentColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)lightBodyTextColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)buttonBackgroundColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTQTMButton
|
%hook YTQTMButton
|
||||||
- (void)setImage:(UIImage *)image {
|
- (void)setImage:(UIImage *)image {
|
||||||
UIImage *currentImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
UIImage *tintedImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||||
[self setTintColor:[UIColor whiteColor]];
|
[self setTintColor:kDefaultTextColor];
|
||||||
%orig(currentImage);
|
%orig(tintedImage);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook UIExtendedSRGColorSpace
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig([kDefaultTextColor colorWithAlphaComponent:0.9]);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIExtendedSRGBColorSpace
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig([kDefaultTextColor colorWithAlphaComponent:1.0]);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
%hook UIExtendedGrayColorSpace
|
%hook UIExtendedGrayColorSpace
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
textColor = [[UIColor whiteColor] colorWithAlphaComponent:1.0];
|
%orig([kDefaultTextColor colorWithAlphaComponent:1.0]);
|
||||||
%orig();
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook VideoTitleLabel
|
%hook VideoTitleLabel
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
textColor = [UIColor whiteColor];
|
%orig(kDefaultTextColor);
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UILabel
|
%hook UILabel
|
||||||
+ (void)load {
|
+ (void)load {
|
||||||
@autoreleasepool {
|
[[UILabel appearance] setTextColor:kDefaultTextColor];
|
||||||
[[UILabel appearance] setTextColor:[UIColor whiteColor]];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%log;
|
%orig(kDefaultTextColor);
|
||||||
textColor = [UIColor whiteColor];
|
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UITextField
|
%hook UITextField
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%log;
|
%orig(kDefaultTextColor);
|
||||||
textColor = [UIColor whiteColor];
|
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UITextView
|
%hook UITextView
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%log;
|
%orig(kDefaultTextColor);
|
||||||
textColor = [UIColor whiteColor];
|
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UISearchBar
|
%hook UISearchBar
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
textColor = [UIColor whiteColor];
|
%orig(kDefaultTextColor);
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UISegmentedControl
|
%hook UISegmentedControl
|
||||||
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||||
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
||||||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
|
||||||
%orig(modifiedAttributes, state);
|
%orig(modifiedAttributes, state);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UIButton
|
%hook UIButton
|
||||||
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state {
|
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state {
|
||||||
color = [UIColor whiteColor];
|
%orig(kDefaultTextColor, state);
|
||||||
%orig(color, state);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UIBarButtonItem
|
%hook UIBarButtonItem
|
||||||
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||||
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
||||||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
|
||||||
%orig(modifiedAttributes, state);
|
%orig(modifiedAttributes, state);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook NSAttributedString
|
%hook NSAttributedString
|
||||||
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary<NSAttributedStringKey, id> *)attrs {
|
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary<NSAttributedStringKey, id> *)attrs {
|
||||||
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attrs];
|
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attrs];
|
||||||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
|
||||||
return %orig(str, modifiedAttributes);
|
return %orig(str, modifiedAttributes);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook CATextLayer
|
%hook CATextLayer
|
||||||
- (void)setTextColor:(CGColorRef)textColor {
|
- (void)setTextColor:(CGColorRef)textColor {
|
||||||
%orig([UIColor whiteColor].CGColor);
|
%orig(kDefaultTextColor.CGColor);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASTextNode
|
%hook ASTextNode
|
||||||
- (NSAttributedString *)attributedString {
|
- (NSAttributedString *)attributedString {
|
||||||
NSAttributedString *originalAttributedString = %orig;
|
NSAttributedString *original = %orig;
|
||||||
NSMutableAttributedString *newAttributedString = [originalAttributedString mutableCopy];
|
NSMutableAttributedString *modified = [original mutableCopy];
|
||||||
[newAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0, newAttributedString.length)];
|
[modified addAttribute:NSForegroundColorAttributeName value:kDefaultTextColor range:NSMakeRange(0, modified.length)];
|
||||||
return newAttributedString;
|
return modified;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASTextFieldNode
|
%hook ASTextFieldNode
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%orig([UIColor whiteColor]);
|
%orig(kDefaultTextColor);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASTextView
|
%hook ASTextView
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%orig([UIColor whiteColor]);
|
%orig(kDefaultTextColor);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASButtonNode
|
%hook ASButtonNode
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%orig([UIColor whiteColor]);
|
%orig(kDefaultTextColor);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIControl
|
||||||
|
- (UIColor *)backgroundColor {
|
||||||
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%group gCustomContrastMode // Custom Contrast Mode (Hex Color)
|
// Custom Contrast Mode
|
||||||
|
%group gCustomContrastMode
|
||||||
%hook UIColor
|
%hook UIColor
|
||||||
+ (UIColor *)whiteColor {
|
+ (UIColor *)colorNamed:(NSString *)name {
|
||||||
return lcmHexColor;
|
NSArray<NSString *> *targetColors = @[
|
||||||
}
|
@"whiteColor", @"lightTextColor", @"lightGrayColor", @"ychGrey7",
|
||||||
+ (UIColor *)lightTextColor {
|
@"skt_chipBackgroundColor", @"placeholderTextColor", @"systemLightGrayColor",
|
||||||
return lcmHexColor;
|
@"systemExtraLightGrayColor", @"labelColor", @"secondaryLabelColor",
|
||||||
}
|
@"tertiaryLabelColor", @"quaternaryLabelColor"
|
||||||
+ (UIColor *)placeholderTextColor {
|
];
|
||||||
return lcmHexColor;
|
return [targetColors containsObject:name] ? lcmHexColor : %orig;
|
||||||
}
|
|
||||||
+ (UIColor *)labelColor {
|
|
||||||
return lcmHexColor;
|
|
||||||
}
|
|
||||||
+ (UIColor *)secondaryLabelColor {
|
|
||||||
return lcmHexColor;
|
|
||||||
}
|
|
||||||
+ (UIColor *)tertiaryLabelColor {
|
|
||||||
return lcmHexColor;
|
|
||||||
}
|
|
||||||
+ (UIColor *)quaternaryLabelColor {
|
|
||||||
return lcmHexColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (UIColor *)whiteColor { return lcmHexColor; }
|
||||||
|
+ (UIColor *)lightTextColor { return lcmHexColor; }
|
||||||
|
+ (UIColor *)lightGrayColor { return lcmHexColor; }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTCommonColorPalette
|
%hook YTCommonColorPalette
|
||||||
- (UIColor *)textPrimary {
|
- (UIColor *)textPrimary {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)textSecondary {
|
- (UIColor *)textSecondary {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayTextPrimary {
|
- (UIColor *)overlayTextPrimary {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayTextSecondary {
|
- (UIColor *)overlayTextSecondary {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)iconActive {
|
- (UIColor *)iconActive {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)iconActiveOther {
|
- (UIColor *)iconActiveOther {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)brandIconActive {
|
- (UIColor *)brandIconActive {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)staticBrandWhite {
|
- (UIColor *)staticBrandWhite {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)overlayIconActiveOther {
|
- (UIColor *)overlayIconActiveOther {
|
||||||
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
|
return self.pageStyle == 1 ? kDefaultTextColor : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)overlayIconInactive {
|
||||||
|
return self.pageStyle == 1 ? [kDefaultTextColor colorWithAlphaComponent:0.7] : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)overlayIconDisabled {
|
||||||
|
return self.pageStyle == 1 ? [kDefaultTextColor colorWithAlphaComponent:0.3] : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)overlayFilledButtonActive {
|
||||||
|
return self.pageStyle == 1 ? [kDefaultTextColor colorWithAlphaComponent:0.2] : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTColor
|
%hook YTColor
|
||||||
+ (UIColor *)white2 {
|
+ (BOOL)darkerPaletteTextColorEnabled { return NO; }
|
||||||
return [UIColor whiteColor];
|
+ (UIColor *)white1 { return lcmHexColor; }
|
||||||
}
|
+ (UIColor *)white2 { return lcmHexColor; }
|
||||||
+ (UIColor *)white3 {
|
+ (UIColor *)white3 { return lcmHexColor; }
|
||||||
return [UIColor whiteColor];
|
+ (UIColor *)white4 { return lcmHexColor; }
|
||||||
}
|
+ (UIColor *)white5 { return lcmHexColor; }
|
||||||
+ (UIColor *)white4 {
|
+ (UIColor *)grey1 { return lcmHexColor; }
|
||||||
return [UIColor whiteColor];
|
+ (UIColor *)grey2 { return lcmHexColor; }
|
||||||
}
|
|
||||||
+ (UIColor *)white5 {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
%end
|
%end
|
||||||
%hook QTMColorGroup
|
|
||||||
- (UIColor *)tint100 {
|
%hook _ASDisplayView
|
||||||
return [UIColor whiteColor];
|
- (void)layoutSubviews {
|
||||||
}
|
%orig;
|
||||||
- (UIColor *)tint300 {
|
NSArray<NSString *> *targetLabels = @[@"connect account", @"Thanks", @"Save to playlist", @"Report"];
|
||||||
return [UIColor whiteColor];
|
for (UIView *subview in self.subviews) {
|
||||||
}
|
if ([targetLabels containsObject:subview.accessibilityLabel]) {
|
||||||
- (UIColor *)bodyTextColor {
|
subview.backgroundColor = lcmHexColor;
|
||||||
return [UIColor whiteColor];
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
}
|
((UILabel *)subview).textColor = [UIColor blackColor];
|
||||||
- (UIColor *)bodyTextColorOnLighterColor {
|
}
|
||||||
return [UIColor whiteColor];
|
}
|
||||||
}
|
|
||||||
- (UIColor *)bodyTextColorOnRegularColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)bodyTextColorOnDarkerColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)bodyTextColorOnAccentColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)bodyTextColorOnOnBrightAccentColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)lightBodyTextColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
- (UIColor *)buttonBackgroundColor {
|
|
||||||
return [UIColor whiteColor];
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook YTQTMButton
|
|
||||||
- (void)setImage:(UIImage *)image {
|
|
||||||
UIImage *currentImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
|
||||||
[self setTintColor:[UIColor whiteColor]];
|
|
||||||
%orig(currentImage);
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook UIExtendedGrayColorSpace
|
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
|
||||||
textColor = [[UIColor whiteColor] colorWithAlphaComponent:1.0];
|
|
||||||
%orig();
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook VideoTitleLabel
|
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
|
||||||
textColor = [UIColor whiteColor];
|
|
||||||
%orig(textColor);
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook UILabel
|
|
||||||
+ (void)load {
|
|
||||||
@autoreleasepool {
|
|
||||||
[[UILabel appearance] setTextColor:[UIColor whiteColor]];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
%end
|
||||||
%log;
|
|
||||||
textColor = [UIColor whiteColor];
|
%hook QTMColorGroup
|
||||||
%orig(textColor);
|
- (UIColor *)tint100 { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)tint300 { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)tint500 { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)tint700 { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)accent200 { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)accent400 { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)accentColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)brightAccentColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)regularColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)darkerColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)bodyTextColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)lightBodyTextColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)bodyTextColorOnRegularColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)bodyTextColorOnLighterColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)bodyTextColorOnDarkerColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)bodyTextColorOnAccentColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)buttonBackgroundColor { return kDefaultTextColor; }
|
||||||
|
- (UIColor *)Color { return kDefaultTextColor; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTQTMButton
|
||||||
|
- (void)setImage:(UIImage *)image {
|
||||||
|
UIImage *tintedImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||||
|
[self setTintColor:kDefaultTextColor];
|
||||||
|
%orig(tintedImage);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook UIExtendedSRGColorSpace
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig([kDefaultTextColor colorWithAlphaComponent:0.9]);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIExtendedSRGBColorSpace
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig([kDefaultTextColor colorWithAlphaComponent:1.0]);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIExtendedGrayColorSpace
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig([kDefaultTextColor colorWithAlphaComponent:1.0]);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook VideoTitleLabel
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig(kDefaultTextColor);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UILabel
|
||||||
|
+ (void)load {
|
||||||
|
[[UILabel appearance] setTextColor:kDefaultTextColor];
|
||||||
|
}
|
||||||
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
|
%orig(kDefaultTextColor);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
%hook UITextField
|
%hook UITextField
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%log;
|
%orig(kDefaultTextColor);
|
||||||
textColor = [UIColor whiteColor];
|
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UITextView
|
%hook UITextView
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%log;
|
%orig(kDefaultTextColor);
|
||||||
textColor = [UIColor whiteColor];
|
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UISearchBar
|
%hook UISearchBar
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
textColor = [UIColor whiteColor];
|
%orig(kDefaultTextColor);
|
||||||
%orig(textColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UISegmentedControl
|
%hook UISegmentedControl
|
||||||
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||||
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
||||||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
|
||||||
%orig(modifiedAttributes, state);
|
%orig(modifiedAttributes, state);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UIButton
|
%hook UIButton
|
||||||
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state {
|
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state {
|
||||||
color = [UIColor whiteColor];
|
%orig(kDefaultTextColor, state);
|
||||||
%orig(color, state);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UIBarButtonItem
|
%hook UIBarButtonItem
|
||||||
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||||
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
||||||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
|
||||||
%orig(modifiedAttributes, state);
|
%orig(modifiedAttributes, state);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook NSAttributedString
|
%hook NSAttributedString
|
||||||
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary<NSAttributedStringKey, id> *)attrs {
|
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary<NSAttributedStringKey, id> *)attrs {
|
||||||
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attrs];
|
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attrs];
|
||||||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
|
||||||
return %orig(str, modifiedAttributes);
|
return %orig(str, modifiedAttributes);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook CATextLayer
|
%hook CATextLayer
|
||||||
- (void)setTextColor:(CGColorRef)textColor {
|
- (void)setTextColor:(CGColorRef)color {
|
||||||
%orig([UIColor whiteColor].CGColor);
|
%orig(kDefaultTextColor.CGColor);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASTextNode
|
%hook ASTextNode
|
||||||
- (NSAttributedString *)attributedString {
|
- (NSAttributedString *)attributedString {
|
||||||
NSAttributedString *originalAttributedString = %orig;
|
NSAttributedString *original = %orig;
|
||||||
NSMutableAttributedString *newAttributedString = [originalAttributedString mutableCopy];
|
NSMutableAttributedString *modified = [original mutableCopy];
|
||||||
[newAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0, newAttributedString.length)];
|
[modified addAttribute:NSForegroundColorAttributeName value:kDefaultTextColor range:NSMakeRange(0, modified.length)];
|
||||||
return newAttributedString;
|
return modified;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASTextFieldNode
|
%hook ASTextFieldNode
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%orig([UIColor whiteColor]);
|
%orig(kDefaultTextColor);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASTextView
|
%hook ASTextView
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%orig([UIColor whiteColor]);
|
%orig(kDefaultTextColor);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASButtonNode
|
%hook ASButtonNode
|
||||||
- (void)setTextColor:(UIColor *)textColor {
|
- (void)setTextColor:(UIColor *)textColor {
|
||||||
%orig([UIColor whiteColor]);
|
%orig(kDefaultTextColor);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIControl
|
||||||
|
- (UIColor *)backgroundColor {
|
||||||
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%end
|
%end
|
||||||
|
|
||||||
# pragma mark - ctor
|
// Constructor
|
||||||
%ctor {
|
%ctor {
|
||||||
%init;
|
%init;
|
||||||
if (lowContrastMode()) {
|
if (lowContrastMode()) {
|
||||||
%init(gLowContrastMode);
|
%init(gLowContrastMode);
|
||||||
}
|
}
|
||||||
if (customContrastMode()) {
|
if (customContrastMode()) {
|
||||||
%init(gCustomContrastMode);
|
NSData *colorData = [[NSUserDefaults standardUserDefaults] objectForKey:@"kCustomUIColor"];
|
||||||
|
if (colorData) {
|
||||||
|
NSError *error = nil;
|
||||||
|
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:colorData error:&error];
|
||||||
|
if (!error) {
|
||||||
|
[unarchiver setRequiresSecureCoding:NO];
|
||||||
|
lcmHexColor = [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
|
||||||
|
if (lcmHexColor) {
|
||||||
|
%init(gCustomContrastMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Submodule Tweaks/DontEatMyContent updated: b9b0cd5784...59c51ce086
Submodule Tweaks/Return-YouTube-Dislikes updated: d809615ac8...8573ce3fec
Submodule Tweaks/YTABConfig updated: c9c39a4c88...634443f699
Submodule Tweaks/YTUHD updated: 3e1914daf8...0f59b38817
Submodule Tweaks/YTVideoOverlay updated: cca8ee5731...3060d66bfd
Submodule Tweaks/YouLoop updated: eb33ec3b68...899a2fdd53
Submodule Tweaks/YouMute updated: 39e8b73fc5...0548225b0a
Submodule Tweaks/YouQuality updated: 89ec650cf5...08e9ff49cf
Submodule Tweaks/YouSpeed updated: fed52af4dd...d91d799245
Submodule Tweaks/YouTubeHeader updated: 0c9cb5fe84...cb3074fc62
Submodule Tweaks/protobuf updated: c225da739e...f1f222ef13
Reference in New Issue
Block a user