Update Themes.xm
This commit is contained in:
parent
b996a9682d
commit
db77aef6a0
1 changed files with 34 additions and 168 deletions
202
Source/Themes.xm
202
Source/Themes.xm
|
|
@ -40,123 +40,56 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
||||||
%hook UIView
|
%hook UIView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPivotBarView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPivotBarView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSlideForActionsView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSlideForActionsView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTChipCloudCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTChipCloudCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTextCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTextCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatViewerEngagementCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatViewerEngagementCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistHeaderView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistHeaderView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTAsyncCollectionView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTAsyncCollectionView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTLinkCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTLinkCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTMessageCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTMessageCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSearchView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSearchView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTDrawerAvatarCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTDrawerAvatarCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFeedHeaderView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFeedHeaderView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTCommentsHeaderView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTCommentsHeaderView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook SponsorBlockSettingsController
|
%hook SponsorBlockSettingsController
|
||||||
|
|
@ -508,123 +441,56 @@ UIColor* raisedColor = [UIColor blackColor];
|
||||||
%hook UIView
|
%hook UIView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPivotBarView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPivotBarView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSlideForActionsView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSlideForActionsView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTChipCloudCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTChipCloudCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTextCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTextCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatViewerEngagementCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatViewerEngagementCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistHeaderView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistHeaderView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTAsyncCollectionView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTAsyncCollectionView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTLinkCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTLinkCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTMessageCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTMessageCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSearchView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSearchView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTDrawerAvatarCell")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTDrawerAvatarCell")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFeedHeaderView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFeedHeaderView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTCommentsHeaderView")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTCommentsHeaderView")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
||||||
if (isDarkMode()) {
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%orig(color);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook SponsorBlockSettingsController
|
%hook SponsorBlockSettingsController
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue