mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-18 21:22:10 +00:00
Updated an Option
Previous Code appears to not work. so now I'm using this version of the code based off of YouTube Reborn.
This commit is contained in:
parent
8f7a6a7a68
commit
ade503ebb3
1 changed files with 6 additions and 15 deletions
21
uYouPlus.xm
21
uYouPlus.xm
|
|
@ -933,20 +933,14 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
%end
|
||||
|
||||
// Hide the Comment Section under the Video Player - @arichorn
|
||||
%group gNoCommentSection
|
||||
%hook YTIElementRenderer
|
||||
- (NSData *)elementData {
|
||||
NSArray *commentSectionIDs = @[@"id.ui.comments_entry_point_teaser", @"id.ui.comments_entry_point_simplebox", @"id.ui_video_metadata_carousel", @"id.ui.carousel_header"];
|
||||
NSString *description = [self description];
|
||||
for (NSString *commentSectionID in commentSectionIDs) {
|
||||
if ([description containsString:commentSectionID]) {
|
||||
return [NSData data];
|
||||
}
|
||||
}
|
||||
return %orig;
|
||||
%hook _ASDisplayView
|
||||
- (void)didMoveToWindow {
|
||||
%orig;
|
||||
if ((IsEnabled(@"hideCommentSection_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"] || [self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_simplebox"] || [self.accessibilityIdentifier isEqualToString:@"id.ui_video_metadata_carousel"] || [self.accessibilityIdentifier isEqualToString:@"id.ui.carousel_header"])) {
|
||||
self.hidden = YES;
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// Hide the Videos under the Video Player - @Dayanch96
|
||||
%group gNoRelatedWatchNexts
|
||||
|
|
@ -1074,9 +1068,6 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
if (IsEnabled(@"hideHeatwaves_enabled")) {
|
||||
%init(gHideHeatwaves);
|
||||
}
|
||||
if (IsEnabled(@"noCommentSection_enabled")) {
|
||||
%init(gNoCommentSection);
|
||||
}
|
||||
if (IsEnabled(@"noRelatedWatchNexts_enabled")) {
|
||||
%init(gNoRelatedWatchNexts);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue