Merge some changes

This commit is contained in:
arichornlover 2023-12-02 15:29:45 -06:00 committed by GitHub
parent a1f8eb92be
commit 0e0fedc418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1054,33 +1054,24 @@ static void replaceTab(YTIGuideResponse *response) {
%hook ELMContainerNode
- (void)setBackgroundColor:(id)color {
NSString *containerDescription = [self description];
NSString *containerDebugDescription = [self debugDescription];
if ([containerDescription containsString:@"eml.compact_subscribe_button"]) {
color = [UIColor redColor];
if (IsEnabled(@"redSubscribeButton_enabled")) {
if ([containerDescription containsString:@"eml.compact_subscribe_button"]) {
color = [UIColor redColor];
}
}
%orig(color);
}
%end
%end
// Hide the Button Containers under the Video Player - 17.x.x and up - @arichorn
%group gHideButtonContainers
%hook ELMContainerNode
- (void)setBackgroundColor:(id)color
NSString *containerDescription = [self description];
if ([containerDescription containsString:@"id.video.like.button"] ||
[containerDescription containsString:@"id.video.dislike.button"] ||
[containerDescription containsString:@"id.video.share.button"] ||
[containerDescription containsString:@"id.video.remix.button"] ||
[containerDescription containsString:@"id.ui.add_to.offline.button"]) {
color = [UIColor clearColor];
if (IsEnabled(@"hideButtonContainers_enabled")) {
if ([containerDescription containsString:@"id.video.like.button"] ||
[containerDescription containsString:@"id.video.dislike.button"] ||
[containerDescription containsString:@"id.video.share.button"] ||
[containerDescription containsString:@"id.video.remix.button"] ||
[containerDescription containsString:@"id.ui.add_to.offline.button"]) {
color = [UIColor clearColor];
}
}
%orig(color);
}
%end
%end
// Hide the (Remix / Thanks / Download / Clip / Save) Buttons under the Video Player - 17.x.x and up - @arichorn
%hook _ASDisplayView
@ -1397,12 +1388,6 @@ static void replaceTab(YTIGuideResponse *response) {
if (IsEnabled(@"hideVideoPlayerShadowOverlayButtons_enabled")) {
%init(gHideVideoPlayerShadowOverlayButtons);
}
if (IsEnabled(@"redSubscribeButton_enabled")) {
%init(gRedSubscribeButton);
}
if (IsEnabled(@"hideButtonContainers_enabled")) {
%init(gHideButtonContainers);
}
if (IsEnabled(@"disableHints_enabled")) {
%init(gDisableHints);
}