Improved Hide Ambient Mode & Hide Button Containers

This commit is contained in:
arichornlover 2023-11-29 16:12:38 -06:00 committed by GitHub
parent 012725efa6
commit c2c1f38662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -612,7 +612,8 @@ int main(int argc, char * argv[]) {
%end
%hook YTCinematicContainerView // Disable Ambient Mode Container - YTNoModernUI
- (void)removeFromSuperview {
- (instancetype)init {
return NULL;
}
%end
@ -680,7 +681,8 @@ int main(int argc, char * argv[]) {
%group gDisableAmbientMode
%hook YTCinematicContainerView
- (void)removeFromSuperview {
- (instancetype)init {
return NULL;
}
%end
%hook YTColdConfig
@ -1082,7 +1084,16 @@ static void replaceTab(YTIGuideResponse *response) {
%group gHideButtonContainers
%hook ELMContainerNode
- (void)setBackgroundColor:(id)color {
color = [UIColor clearColor];
if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"] ||
[self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"] ||
[self.accessibilityIdentifier isEqualToString:@"id.video.share.button"] ||
[self.accessibilityIdentifier isEqualToString:@"id.video.remix.button"] ||
[self.accessibilityLabel isEqualToString:@"Thanks"] ||
[self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"] ||
[self.accessibilityLabel isEqualToString:@"Clip"] ||
[self.accessibilityLabel isEqualToString:@"Save to playlist"]) {
color = [UIColor clearColor];
}
%orig(color);
}
%end