From 09279bf0d282645688666885a67c49a83ca7f0bf Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 21 Jun 2024 22:30:07 -0500 Subject: [PATCH] Update uYouPlus.xm --- Sources/uYouPlus.xm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 78fe05c5bd..e8420c4a3d 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -179,11 +179,7 @@ static uint8_t cellDividerDataBytes[] = { }; %hook YTIElementRenderer - (NSData *)elementData { - NSString *description = [self description]; - if ([description containsString:@"cell_divider"]) { - if (!cellDividerData) cellDividerData = %orig; - return cellDividerData; - } + // NSString *description = [self description]; if ([self respondsToSelector:@selector(hasCompatibilityOptions)] && self.hasCompatibilityOptions && self.compatibilityOptions.hasAdLoggingData) return cellDividerData; return %orig; } @@ -199,10 +195,7 @@ static uint8_t cellDividerDataBytes[] = { YTIItemSectionSupportedRenderers *firstObject = [sectionRenderer.contentsArray firstObject]; YTIElementRenderer *elementRenderer = firstObject.elementRenderer; NSString *description = [elementRenderer description]; - return isAdString(description) - || [description containsString:@"post_shelf"] - || [description containsString:@"product_carousel"] - || [description containsString:@"statement_banner"]; + return isAdString(description); }]; [contentsArray removeObjectsAtIndexes:removeIndexes]; } @@ -1647,6 +1640,8 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide // Load uYou first so its functions are available for hooks. // dlopen([[NSString stringWithFormat:@"%@/Frameworks/uYou.dylib", [[NSBundle mainBundle] bundlePath]] UTF8String], RTLD_LAZY); + cellDividerData = [NSData dataWithBytes:cellDividerDataBytes length:cellDividerDataBytesLength]; + %init; if (IS_ENABLED(@"hideYouTubeLogo_enabled")) { %init(gHideYouTubeLogo);