mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-30 20:34:03 -04:00 
			
		
		
		
	Remove YTUnShorts
This commit is contained in:
		| @@ -410,31 +410,11 @@ BOOL isTabSelected = NO; | ||||
| %end | ||||
| %end | ||||
|  | ||||
| // YTUnShorts - https://github.com/PoomSmart/YTUnShorts | ||||
| // Hide Community Posts - @michael-winay & @arichorn | ||||
| %hook YTIElementRenderer | ||||
|  | ||||
| static NSData *cellDividerData = nil; | ||||
|  | ||||
| - (NSData *)elementData { | ||||
|     NSString *description = [self description]; | ||||
|      | ||||
|     if (IsEnabled(@"UnShorts_enabled")) { | ||||
|         if ([description containsString:@"cell_divider"]) { | ||||
|             if (!cellDividerData) cellDividerData = %orig; | ||||
|             return cellDividerData; | ||||
|         } | ||||
|  | ||||
|         BOOL hasShorts = ([description containsString:@"shorts_shelf.eml"] ||  | ||||
|                           [description containsString:@"shorts_video_cell.eml"] ||  | ||||
|                           [description containsString:@"6Shorts"]) &&  | ||||
|                          ![description containsString:@"history*"]; | ||||
|         BOOL hasShortsInHistory = [description containsString:@"compact_video.eml"] &&  | ||||
|                                   [description containsString:@"youtube_shorts_"]; | ||||
|  | ||||
|         if (hasShorts || hasShortsInHistory) return cellDividerData; | ||||
|     } | ||||
|  | ||||
| // Hide Community Posts - @michael-winay & @arichorn | ||||
|     if (IsEnabled(@"hideCommunityPosts_enabled")) { | ||||
|         if ([description containsString:@"post_base_wrapper.eml"]) { | ||||
|             return nil; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bryce Hackel
					Bryce Hackel