who read this tho?
This commit is contained in:
+31
-26
@@ -66,7 +66,7 @@ BOOL ytMiniPlayer() {
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide CC / Autoplay switch
|
||||
// Hide CC / Autoplay switch / Next & Previous button
|
||||
%hook YTMainAppControlsOverlayView
|
||||
- (void)setClosedCaptionsOrSubtitlesButtonAvailable:(BOOL)arg1 { // hide CC?!
|
||||
if (hideCC()) { return %orig(NO); }
|
||||
@@ -78,11 +78,10 @@ BOOL ytMiniPlayer() {
|
||||
}
|
||||
- (void)layoutSubviews {
|
||||
if (hidePreviousAndNextButton()) {
|
||||
%orig;
|
||||
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
|
||||
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
|
||||
%orig;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
@@ -212,8 +211,8 @@ BOOL ytMiniPlayer() {
|
||||
%end
|
||||
|
||||
/*
|
||||
Hide the download playlist button of uYou cuz it's broken ?!
|
||||
Why aren't you working?? :/
|
||||
// Hide the download playlist button of uYou cuz it's broken ?!
|
||||
// Why aren't you working?? :/
|
||||
%hook YTPlaylistHeaderViewController
|
||||
- (void)viewDidLoad {
|
||||
%orig;
|
||||
@@ -221,7 +220,7 @@ Why aren't you working?? :/
|
||||
}
|
||||
%end
|
||||
|
||||
Workaround for issue #54
|
||||
// Workaround for issue #54
|
||||
%hook YTMainAppVideoPlayerOverlayViewController
|
||||
- (void)updateRelatedVideos {
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"relatedVideosAtTheEndOfYTVideos"] == NO) {}
|
||||
@@ -352,6 +351,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
// Your videos
|
||||
%hook ASCollectionView
|
||||
- (void)didMoveToWindow {
|
||||
if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) {
|
||||
@@ -400,6 +400,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
// History Search view
|
||||
%hook YTSearchBoxView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
@@ -419,7 +420,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTCreateCommentAccessoryView // community reply comment
|
||||
%hook YTCreateCommentAccessoryView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
return %orig(oledColor);
|
||||
@@ -443,22 +444,6 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
%hook _ASDisplayView
|
||||
- (void)didMoveToWindow {
|
||||
%orig;
|
||||
if (isDarkMode()) {
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = oledColor; }
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTFormattedStringLabel // YT is werid...
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
@@ -468,7 +453,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YCHLiveChatActionPanelView // live chat comment
|
||||
// Live chat comment
|
||||
%hook YCHLiveChatActionPanelView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
return %orig(oledColor);
|
||||
@@ -477,7 +463,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTEmojiTextView // live chat comment
|
||||
%hook YTEmojiTextView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
return %orig(oledColor);
|
||||
@@ -486,6 +472,24 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
}
|
||||
%end
|
||||
|
||||
// Nasty stuff :/
|
||||
%hook _ASDisplayView
|
||||
- (void)didMoveToWindow {
|
||||
%orig;
|
||||
if (isDarkMode()) {
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = oledColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = oledColor; }
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
// Open link with...
|
||||
%hook ASWAppSwitchingSheetHeaderView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
@@ -506,8 +510,9 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
%hook ASWAppSwitcherCollectionViewCell
|
||||
- (void)didMoveToWindow {
|
||||
if (isDarkMode()) {
|
||||
%orig;
|
||||
%orig;
|
||||
self.subviews[1].backgroundColor = oledColor;
|
||||
self.superview.backgroundColor = oledColor;
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
Reference in New Issue
Block a user