mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-30 20:34:03 -04:00 
			
		
		
		
	Fixed #55 (Updated YTUnshorts from Poomsmart)
This commit is contained in:
		| @@ -348,18 +348,28 @@ static BOOL IsEnabled(NSString *key) { | ||||
|  | ||||
| // YTUnShorts - https://github.com/PoomSmart/YTUnShorts | ||||
| %hook YTIElementRenderer | ||||
|  | ||||
| static NSData *cellDividerData = nil; | ||||
|  | ||||
| - (NSData *)elementData { | ||||
|     NSString *description = [self description]; | ||||
|      | ||||
|     if (IsEnabled(@"UnShorts_enabled")) { | ||||
|         if ([description containsString:@"shorts_shelf.eml"] || | ||||
|             [description containsString:@"#shorts"] || | ||||
|             [description containsString:@"shorts_video_cell.eml"] || | ||||
|             [description containsString:@"6Shorts"]) { | ||||
|             if (![description containsString:@"history*"]) { | ||||
|                 return nil; | ||||
|             } | ||||
|         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"]) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Balackburn
					Balackburn