Skip to content

Commit

Permalink
Brought Back Changes from Previous Branch
Browse files Browse the repository at this point in the history
  • Loading branch information
arichornlover authored Aug 4, 2022
1 parent 84d0b60 commit bb3a22b
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions CercubePlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ BOOL hidePaidPromotionCard() {
BOOL hideNotificationButton() {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideNotificationButton_enabled"];
}
BOOL ytDisableHighContrastIcons () {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"ytDisableHighContrastIcons_enabled"];
}

# pragma mark - Tweaks
// Enable Reorder videos from playlist while on the Watch page - @PoomSmart
Expand Down Expand Up @@ -659,6 +662,71 @@ static void replaceTab(YTIGuideResponse *response) {
%end
%end

%group gYTDisableHighContrastIcons
%hook YTCommonColorPalette
- (UIColor *)textPrimary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)textSecondary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)textDisabled {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)textPrimaryInverse {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)overlayTextPrimary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)overlayTextSecondary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)overlayTextTertiary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)overlayButtonSecondary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)overlayButtonPrimary {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
- (UIColor *)themedOverlayBackground {
if (self.pageStyle == 1) {
return [UIColor colorWithWhite:0.565 alpha:1];
}
return [UIColor colorWithWhite:0.5 alpha:1];
}
%end
%end

// YTNoShorts: https://github.com/MiRO92/YTNoShorts
%hook YTAsyncCollectionView
- (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath {
Expand Down Expand Up @@ -699,4 +767,7 @@ static void replaceTab(YTIGuideResponse *response) {
if (hideCastButton()) {
%init(gHideCastButton);
}
if (ytDisableHighContrastIcons()) {
%init(gYTDisableHighContrastIcons);
}
}

0 comments on commit bb3a22b

Please sign in to comment.