mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:58:45 -04:00
updated OLD darkmode
This commit is contained in:
@@ -81,16 +81,25 @@ BOOL areColorsEqual(UIColor *color1, UIColor *color2, CGFloat tolerance) {
|
|||||||
|
|
||||||
%hook UIView
|
%hook UIView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
UIColor *targetColor = [UIColor colorWithRed:0.0588235 green:0.0588235 blue:0.0588235 alpha:1];
|
UIColor *targetColor1 = [UIColor colorWithRed:0.0588235 green:0.0588235 blue:0.0588235 alpha:1];
|
||||||
|
UIColor *targetColor2 = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0]; // Replace with the new target color values
|
||||||
CGFloat tolerance = 0.01; // Adjust this value as needed
|
CGFloat tolerance = 0.01; // Adjust this value as needed
|
||||||
|
|
||||||
if (areColorsEqual(color, targetColor, tolerance)) {
|
if (areColorsEqual(color, targetColor1, tolerance) || areColorsEqual(color, targetColor2, tolerance)) {
|
||||||
color = customColor;
|
color = customColor;
|
||||||
}
|
}
|
||||||
%orig(color);
|
%orig(color);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// Hide separators
|
||||||
|
%hook YTCollectionSeparatorView
|
||||||
|
- (void)setHidden:(BOOL)arg1 {
|
||||||
|
%orig(YES);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Hide broken YTCinematicContainerView
|
||||||
%hook YTCinematicContainerView
|
%hook YTCinematicContainerView
|
||||||
- (void)setHidden:(BOOL)arg1 {
|
- (void)setHidden:(BOOL)arg1 {
|
||||||
%orig(YES);
|
%orig(YES);
|
||||||
@@ -103,6 +112,12 @@ BOOL areColorsEqual(UIColor *color1, UIColor *color2, CGFloat tolerance) {
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook YTWatchView
|
||||||
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
|
return pageStyle == 1 ? customColor : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
%hook YTChannelMobileHeaderViewController
|
%hook YTChannelMobileHeaderViewController
|
||||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
return pageStyle == 1 ? customColor : %orig;
|
return pageStyle == 1 ? customColor : %orig;
|
||||||
|
Reference in New Issue
Block a user