clean up
This commit is contained in:
+59
-52
@@ -91,7 +91,6 @@ BOOL ytMiniPlayer() {
|
|||||||
if (hidePreviousAndNextButton()) {
|
if (hidePreviousAndNextButton()) {
|
||||||
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
|
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
|
||||||
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
|
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
|
||||||
// YouTube love beta testing :/
|
|
||||||
// MSHookIvar<YTTransportControlsButtonView *>(self, "_nextButtonView").hidden = YES;
|
// MSHookIvar<YTTransportControlsButtonView *>(self, "_nextButtonView").hidden = YES;
|
||||||
// MSHookIvar<YTTransportControlsButtonView *>(self, "_previousButtonView").hidden = YES;
|
// MSHookIvar<YTTransportControlsButtonView *>(self, "_previousButtonView").hidden = YES;
|
||||||
}
|
}
|
||||||
@@ -239,7 +238,6 @@ BOOL ytMiniPlayer() {
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
// Hide the download playlist button of uYou cuz it's broken ?!
|
// Hide the download playlist button of uYou cuz it's broken ?!
|
||||||
// Why aren't you working?? :/
|
|
||||||
// %hook YTPlaylistHeaderViewController
|
// %hook YTPlaylistHeaderViewController
|
||||||
// - (void)viewDidLoad {
|
// - (void)viewDidLoad {
|
||||||
// %orig;
|
// %orig;
|
||||||
@@ -268,6 +266,7 @@ BOOL ytMiniPlayer() {
|
|||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
|
|
||||||
%new
|
%new
|
||||||
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
|
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
|
||||||
@@ -330,38 +329,35 @@ BOOL ytMiniPlayer() {
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
# pragma mark - OLED dark mode by BandarHL
|
# pragma mark - OLED dark mode by BandarHL
|
||||||
|
|
||||||
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|
||||||
|
|
||||||
%group gOLED
|
%group gOLED
|
||||||
%hook YTCommonColorPalette
|
%hook YTCommonColorPalette
|
||||||
- (UIColor *)brandBackgroundSolid {
|
- (UIColor *)brandBackgroundSolid {
|
||||||
if (self.pageStyle == 1) {
|
if (self.pageStyle == 1) {
|
||||||
return oledColor;
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)brandBackgroundPrimary {
|
- (UIColor *)brandBackgroundPrimary {
|
||||||
if (self.pageStyle == 1) {
|
if (self.pageStyle == 1) {
|
||||||
return oledColor;
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)brandBackgroundSecondary {
|
- (UIColor *)brandBackgroundSecondary {
|
||||||
if (self.pageStyle == 1) {
|
if (self.pageStyle == 1) {
|
||||||
return oledColor;
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)staticBrandBlack {
|
- (UIColor *)staticBrandBlack {
|
||||||
if (self.pageStyle == 1) {
|
if (self.pageStyle == 1) {
|
||||||
return oledColor;
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
- (UIColor *)generalBackgroundA {
|
- (UIColor *)generalBackgroundA {
|
||||||
if (self.pageStyle == 1) {
|
if (self.pageStyle == 1) {
|
||||||
return oledColor;
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -371,26 +367,26 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTAccountPanelBodyViewController
|
%hook YTAccountPanelBodyViewController
|
||||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
if (pageStyle == 1) {
|
if (pageStyle == 1) {
|
||||||
return oledColor;
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTInnerTubeCollectionViewController
|
// %hook YTInnerTubeCollectionViewController
|
||||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
// - (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
if (pageStyle == 1) {
|
// if (pageStyle == 1) {
|
||||||
return oledColor;
|
// return [UIColor blackColor];
|
||||||
}
|
// }
|
||||||
return %orig;
|
// return %orig;
|
||||||
}
|
// }
|
||||||
%end
|
// %end
|
||||||
|
|
||||||
// Explore
|
// Explore
|
||||||
%hook ASScrollView
|
%hook ASScrollView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
if (isDarkMode()) {
|
%orig;
|
||||||
%orig;
|
if (isDarkMode()) {
|
||||||
self.backgroundColor = [UIColor clearColor];
|
self.backgroundColor = [UIColor clearColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -399,8 +395,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
// Your videos
|
// Your videos
|
||||||
%hook ASCollectionView
|
%hook ASCollectionView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
|
%orig;
|
||||||
if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) {
|
if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) {
|
||||||
%orig;
|
|
||||||
self.superview.backgroundColor = [UIColor clearColor];
|
self.superview.backgroundColor = [UIColor clearColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -411,7 +407,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
%orig;
|
%orig;
|
||||||
self.tableView.backgroundColor = oledColor;
|
self.tableView.backgroundColor = [UIColor blackColor];
|
||||||
} else { return %orig; }
|
} else { return %orig; }
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
@@ -420,7 +416,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
%orig;
|
%orig;
|
||||||
self.view.backgroundColor = oledColor;
|
self.view.backgroundColor = [UIColor blackColor];
|
||||||
} else { return %orig; }
|
} else { return %orig; }
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
@@ -429,7 +425,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTWatchMiniBarView
|
%hook YTWatchMiniBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig([UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9]);
|
return %orig([[UIColor blackColor] colorWithAlphaComponent:0.88]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -439,7 +435,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTSearchBarView
|
%hook YTSearchBarView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -449,7 +445,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTSearchBoxView
|
%hook YTSearchBoxView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -459,7 +455,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTCommentView
|
%hook YTCommentView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -468,7 +464,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTCreateCommentAccessoryView
|
%hook YTCreateCommentAccessoryView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -477,7 +473,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTCreateCommentTextView
|
%hook YTCreateCommentTextView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -489,6 +485,15 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook YTCommentDetailHeaderCell
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
%orig;
|
||||||
|
if (isDarkMode()) {
|
||||||
|
self.subviews[2].backgroundColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
%hook YTFormattedStringLabel // YT is werid...
|
%hook YTFormattedStringLabel // YT is werid...
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
@@ -502,7 +507,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YCHLiveChatActionPanelView
|
%hook YCHLiveChatActionPanelView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -511,7 +516,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTEmojiTextView
|
%hook YTEmojiTextView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
@@ -522,17 +527,17 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = [UIColor clearColor]; }
|
if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = [UIColor clearColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.superview.backgroundColor = oledColor; }
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
@@ -541,25 +546,27 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook ASWAppSwitchingSheetHeaderView
|
%hook ASWAppSwitchingSheetHeaderView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASWAppSwitchingSheetFooterView
|
%hook ASWAppSwitchingSheetFooterView
|
||||||
- (void)setBackgroundColor:(UIColor *)color {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
return %orig(oledColor);
|
return %orig([UIColor blackColor]);
|
||||||
}
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASWAppSwitcherCollectionViewCell
|
%hook ASWAppSwitcherCollectionViewCell
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
|
%orig;
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
%orig;
|
self.subviews[1].backgroundColor = [UIColor blackColor];
|
||||||
self.subviews[1].backgroundColor = oledColor;
|
self.superview.backgroundColor = [UIColor blackColor];
|
||||||
self.superview.backgroundColor = oledColor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
@@ -570,28 +577,28 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook UIPredictionViewController
|
%hook UIPredictionViewController
|
||||||
- (void)loadView {
|
- (void)loadView {
|
||||||
%orig;
|
%orig;
|
||||||
[self.view setBackgroundColor:oledColor];
|
[self.view setBackgroundColor:[UIColor blackColor]];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UICandidateViewController
|
%hook UICandidateViewController
|
||||||
- (void)loadView {
|
- (void)loadView {
|
||||||
%orig;
|
%orig;
|
||||||
[self.view setBackgroundColor:oledColor];
|
[self.view setBackgroundColor:[UIColor blackColor]];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UIKeyboardDockView
|
%hook UIKeyboardDockView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
self.backgroundColor = oledColor;
|
self.backgroundColor = [UIColor blackColor];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook UIKeyboardLayoutStar
|
%hook UIKeyboardLayoutStar
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
self.backgroundColor = oledColor;
|
self.backgroundColor = [UIColor blackColor];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user