mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:58:45 -04:00
Updated OLED & Old Dark Themes
these changes officially supports the latest YouTube version!
This commit is contained in:
422
Source/Themes.xm
422
Source/Themes.xm
@@ -18,6 +18,15 @@ static BOOL oldDarkTheme() {
|
|||||||
%group gOldDarkTheme
|
%group gOldDarkTheme
|
||||||
UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:1.0];
|
UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:1.0];
|
||||||
%hook YTCommonColorPalette
|
%hook YTCommonColorPalette
|
||||||
|
- (UIColor *)background1 {
|
||||||
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)background2 {
|
||||||
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)background3 {
|
||||||
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
|
}
|
||||||
- (UIColor *)brandBackgroundSolid {
|
- (UIColor *)brandBackgroundSolid {
|
||||||
return self.pageStyle == 1 ? customColor : %orig;
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
}
|
}
|
||||||
@@ -36,64 +45,14 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||||||
- (UIColor *)generalBackgroundA {
|
- (UIColor *)generalBackgroundA {
|
||||||
return self.pageStyle == 1 ? customColor : %orig;
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
}
|
}
|
||||||
%end
|
- (UIColor *)generalBackgroundB {
|
||||||
%hook UIView
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
}
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPivotBarView")]) {
|
- (UIColor *)baseBackground {
|
||||||
color = customColor;
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
}
|
}
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSlideForActionsView")]) {
|
- (UIColor *)menuBackground {
|
||||||
color = customColor;
|
return self.pageStyle == 1 ? customColor : %orig;
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTChipCloudCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistHeaderView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTAsyncCollectionView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTLinkCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTMessageCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSearchView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTDrawerAvatarCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFeedHeaderView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTextCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatViewerEngagementCell")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTCommentsHeaderView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatView")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTickerViewController")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
|
||||||
color = customColor;
|
|
||||||
}
|
|
||||||
%orig;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook SponsorBlockSettingsController
|
%hook SponsorBlockSettingsController
|
||||||
@@ -115,274 +74,276 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||||||
%hook ELMView
|
%hook ELMView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
if (isDarkMode()) {
|
|
||||||
self.subviews[0].backgroundColor = [UIColor clearColor];
|
self.subviews[0].backgroundColor = [UIColor clearColor];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTAsyncCollectionView
|
%hook YTAsyncCollectionView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
|
||||||
color = [UIColor clearColor];
|
color = [UIColor clearColor];
|
||||||
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
|
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
|
||||||
color = [UIColor clearColor];
|
color = [UIColor clearColor];
|
||||||
} else {
|
} else {
|
||||||
color = customColor;
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)darkBackgroundColor {
|
- (UIColor *)darkBackgroundColor {
|
||||||
return customColor;
|
return isDarkMode() ? customColor : %orig;
|
||||||
}
|
}
|
||||||
- (void)setDarkBackgroundColor:(UIColor *)color {
|
- (void)setDarkBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig();
|
%orig();
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
|
||||||
self.subviews[0].subviews[0].backgroundColor = customColor;
|
if (isDarkMode()) {
|
||||||
|
self.subviews[0].subviews[0].backgroundColor = customColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPivotBarView
|
%hook YTPivotBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTHeaderView
|
%hook YTHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSubheaderContainerView
|
%hook YTSubheaderContainerView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTAppView
|
%hook YTAppView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCollectionView
|
%hook YTCollectionView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelListSubMenuView
|
%hook YTChannelListSubMenuView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook YTSettingsCell
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSlideForActionsView
|
%hook YTSlideForActionsView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPageView
|
%hook YTPageView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTWatchView
|
%hook YTWatchView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPlaylistMiniBarView
|
%hook YTPlaylistMiniBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook YTEngagementPanelView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTEngagementPanelHeaderView
|
%hook YTEngagementPanelHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPlaylistPanelControlsView
|
%hook YTPlaylistPanelControlsView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTHorizontalCardListView
|
%hook YTHorizontalCardListView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTWatchMiniBarView
|
%hook YTWatchMiniBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCreateCommentAccessoryView
|
%hook YTCreateCommentAccessoryView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCreateCommentTextView
|
%hook YTCreateCommentTextView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSearchView
|
%hook YTSearchView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook YTVideoView
|
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
|
||||||
%orig(customColor);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSearchBoxView
|
%hook YTSearchBoxView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTTabTitlesView
|
%hook YTTabTitlesView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPrivacyTosFooterView
|
%hook YTPrivacyTosFooterView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTOfflineStorageUsageView
|
%hook YTOfflineStorageUsageView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTInlineSignInView
|
%hook YTInlineSignInView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTFeedChannelFilterHeaderView
|
%hook YTFeedChannelFilterHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YCHLiveChatView
|
%hook YCHLiveChatView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YCHLiveChatActionPanelView
|
%hook YCHLiveChatActionPanelView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTEmojiTextView
|
%hook YTEmojiTextView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTTopAlignedView
|
%hook YTTopAlignedView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig();
|
%orig();
|
||||||
|
if (isDarkMode()) {
|
||||||
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = customColor;
|
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = customColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook GOODialogView
|
%hook GOODialogView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTNavigationBar
|
%hook YTNavigationBar
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
- (void)setBarTintColor:(UIColor *)color {
|
- (void)setBarTintColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelMobileHeaderView
|
%hook YTChannelMobileHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelSubMenuView
|
%hook YTChannelSubMenuView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTWrapperSplitView
|
%hook YTWrapperSplitView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTReelShelfCell
|
%hook YTReelShelfCell
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTReelShelfItemView
|
%hook YTReelShelfItemView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTReelShelfView
|
%hook YTReelShelfView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCommentView
|
%hook YTCommentView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelListSubMenuAvatarView
|
%hook YTChannelListSubMenuAvatarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSearchBarView
|
%hook YTSearchBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook YCHLiveChatBannerCell
|
|
||||||
- (void)layoutSubviews {
|
|
||||||
%orig();
|
|
||||||
MSHookIvar<UIImageView *>(self, "_bannerContainerImageView").hidden = YES;
|
|
||||||
MSHookIvar<UIView *>(self, "_bannerContainerView").backgroundColor = customColor;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTDialogContainerScrollView
|
%hook YTDialogContainerScrollView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTShareTitleView
|
%hook YTShareTitleView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTShareBusyView
|
%hook YTShareBusyView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTELMView
|
%hook YTELMView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTActionSheetHeaderView
|
%hook YTActionSheetHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig(customColor);
|
return isDarkMode() ? %orig(customColor) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTShareMainView
|
%hook YTShareMainView
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig();
|
%orig();
|
||||||
|
if (isDarkMode()) {
|
||||||
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = customColor;
|
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = customColor;
|
||||||
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = customColor;
|
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = customColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
@@ -403,6 +364,9 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||||||
if ([responder isKindOfClass:NSClassFromString(@"YTEditSheetControllerElementsContentViewController")]) {
|
if ([responder isKindOfClass:NSClassFromString(@"YTEditSheetControllerElementsContentViewController")]) {
|
||||||
self.backgroundColor = customColor;
|
self.backgroundColor = customColor;
|
||||||
}
|
}
|
||||||
|
if ([responder isKindOfClass:NSClassFromString(@"YTMainAppEngagementPanelViewController")]) {
|
||||||
|
self.backgroundColor = customColor;
|
||||||
|
}
|
||||||
responder = [responder nextResponder];
|
responder = [responder nextResponder];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -432,10 +396,19 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||||||
%end
|
%end
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// OLED dark mode by BandarHL
|
// OLED dark mode by @BandarHL and modified by @arichorn
|
||||||
UIColor* raisedColor = [UIColor blackColor];
|
UIColor* raisedColor = [UIColor blackColor];
|
||||||
%group gOLED
|
%group gOLED
|
||||||
%hook YTCommonColorPalette
|
%hook YTCommonColorPalette
|
||||||
|
- (UIColor *)background1 {
|
||||||
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)background2 {
|
||||||
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)background3 {
|
||||||
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
|
}
|
||||||
- (UIColor *)brandBackgroundSolid {
|
- (UIColor *)brandBackgroundSolid {
|
||||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
}
|
}
|
||||||
@@ -454,64 +427,14 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||||||
- (UIColor *)generalBackgroundA {
|
- (UIColor *)generalBackgroundA {
|
||||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
}
|
}
|
||||||
%end
|
- (UIColor *)generalBackgroundB {
|
||||||
%hook UIView
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
}
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPivotBarView")]) {
|
- (UIColor *)baseBackground {
|
||||||
color = [UIColor blackColor];
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
}
|
}
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSlideForActionsView")]) {
|
- (UIColor *)menuBackground {
|
||||||
color = [UIColor blackColor];
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTChipCloudCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistHeaderView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTAsyncCollectionView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTLinkCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTMessageCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTSearchView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTDrawerAvatarCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFeedHeaderView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTextCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatViewerEngagementCell")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTCommentsHeaderView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatView")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTickerViewController")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
|
||||||
color = [UIColor blackColor];
|
|
||||||
}
|
|
||||||
%orig;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook SponsorBlockSettingsController
|
%hook SponsorBlockSettingsController
|
||||||
@@ -533,274 +456,276 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||||||
%hook ELMView
|
%hook ELMView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
if (isDarkMode()) {
|
|
||||||
self.subviews[0].backgroundColor = [UIColor clearColor];
|
self.subviews[0].backgroundColor = [UIColor clearColor];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTAsyncCollectionView
|
%hook YTAsyncCollectionView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
|
||||||
color = [UIColor clearColor];
|
color = [UIColor clearColor];
|
||||||
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
|
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
|
||||||
color = [UIColor clearColor];
|
color = [UIColor clearColor];
|
||||||
} else {
|
} else {
|
||||||
color = [UIColor blackColor];
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)darkBackgroundColor {
|
- (UIColor *)darkBackgroundColor {
|
||||||
return [UIColor blackColor];
|
return isDarkMode() ? [UIColor blackColor] : %orig;
|
||||||
}
|
}
|
||||||
- (void)setDarkBackgroundColor:(UIColor *)color {
|
- (void)setDarkBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig();
|
%orig();
|
||||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
|
||||||
self.subviews[0].subviews[0].backgroundColor = [UIColor blackColor];
|
if (isDarkMode()) {
|
||||||
|
self.subviews[0].subviews[0].backgroundColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPivotBarView
|
%hook YTPivotBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTHeaderView
|
%hook YTHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSubheaderContainerView
|
%hook YTSubheaderContainerView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTAppView
|
%hook YTAppView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCollectionView
|
%hook YTCollectionView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelListSubMenuView
|
%hook YTChannelListSubMenuView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook YTSettingsCell
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSlideForActionsView
|
%hook YTSlideForActionsView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPageView
|
%hook YTPageView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTWatchView
|
%hook YTWatchView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPlaylistMiniBarView
|
%hook YTPlaylistMiniBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook YTEngagementPanelView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTEngagementPanelHeaderView
|
%hook YTEngagementPanelHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPlaylistPanelControlsView
|
%hook YTPlaylistPanelControlsView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTHorizontalCardListView
|
%hook YTHorizontalCardListView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTWatchMiniBarView
|
%hook YTWatchMiniBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCreateCommentAccessoryView
|
%hook YTCreateCommentAccessoryView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCreateCommentTextView
|
%hook YTCreateCommentTextView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSearchView
|
%hook YTSearchView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook YTVideoView
|
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
|
||||||
%orig([UIColor blackColor]);
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSearchBoxView
|
%hook YTSearchBoxView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTTabTitlesView
|
%hook YTTabTitlesView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTPrivacyTosFooterView
|
%hook YTPrivacyTosFooterView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTOfflineStorageUsageView
|
%hook YTOfflineStorageUsageView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTInlineSignInView
|
%hook YTInlineSignInView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTFeedChannelFilterHeaderView
|
%hook YTFeedChannelFilterHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YCHLiveChatView
|
%hook YCHLiveChatView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YCHLiveChatActionPanelView
|
%hook YCHLiveChatActionPanelView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTEmojiTextView
|
%hook YTEmojiTextView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTTopAlignedView
|
%hook YTTopAlignedView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig();
|
%orig();
|
||||||
|
if (isDarkMode()) {
|
||||||
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = [UIColor blackColor];
|
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook GOODialogView
|
%hook GOODialogView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTNavigationBar
|
%hook YTNavigationBar
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
- (void)setBarTintColor:(UIColor *)color {
|
- (void)setBarTintColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelMobileHeaderView
|
%hook YTChannelMobileHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelSubMenuView
|
%hook YTChannelSubMenuView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTWrapperSplitView
|
%hook YTWrapperSplitView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTReelShelfCell
|
%hook YTReelShelfCell
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTReelShelfItemView
|
%hook YTReelShelfItemView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTReelShelfView
|
%hook YTReelShelfView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTCommentView
|
%hook YTCommentView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTChannelListSubMenuAvatarView
|
%hook YTChannelListSubMenuAvatarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTSearchBarView
|
%hook YTSearchBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
|
||||||
%end
|
|
||||||
%hook YCHLiveChatBannerCell
|
|
||||||
- (void)layoutSubviews {
|
|
||||||
%orig();
|
|
||||||
MSHookIvar<UIImageView *>(self, "_bannerContainerImageView").hidden = YES;
|
|
||||||
MSHookIvar<UIView *>(self, "_bannerContainerView").backgroundColor = [UIColor blackColor];
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTDialogContainerScrollView
|
%hook YTDialogContainerScrollView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTShareTitleView
|
%hook YTShareTitleView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTShareBusyView
|
%hook YTShareBusyView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTELMView
|
%hook YTELMView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTActionSheetHeaderView
|
%hook YTActionSheetHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig([UIColor blackColor]);
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook YTShareMainView
|
%hook YTShareMainView
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig();
|
%orig();
|
||||||
|
if (isDarkMode()) {
|
||||||
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = [UIColor blackColor];
|
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = [UIColor blackColor];
|
||||||
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = [UIColor blackColor];
|
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
@@ -821,6 +746,9 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||||||
if ([responder isKindOfClass:NSClassFromString(@"YTEditSheetControllerElementsContentViewController")]) {
|
if ([responder isKindOfClass:NSClassFromString(@"YTEditSheetControllerElementsContentViewController")]) {
|
||||||
self.backgroundColor = [UIColor blackColor];
|
self.backgroundColor = [UIColor blackColor];
|
||||||
}
|
}
|
||||||
|
if ([responder isKindOfClass:NSClassFromString(@"YTMainAppEngagementPanelViewController")]) {
|
||||||
|
self.backgroundColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
responder = [responder nextResponder];
|
responder = [responder nextResponder];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user