mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-19 01:32:06 +00:00
Merge pull request #793 from Egaliterrier/main
YouTube-X update fixing shorts ad-block
This commit is contained in:
commit
883584b4cb
1 changed files with 10 additions and 0 deletions
|
|
@ -305,6 +305,14 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
|||
%hook MDXSession
|
||||
- (void)adPlaying:(id)ad {}
|
||||
%end
|
||||
%hook YTReelInfinitePlaybackDataSource
|
||||
- (YTReelModel *)makeContentModelForEntry:(id)entry {
|
||||
YTReelModel *model = %orig;
|
||||
if ([model respondsToSelector:@selector(videoType)] && model.videoType == 3)
|
||||
return nil;
|
||||
return model;
|
||||
}
|
||||
%end
|
||||
NSString *getAdString(NSString *description) {
|
||||
if ([description containsString:@"brand_promo"])
|
||||
return @"brand_promo";
|
||||
|
|
@ -312,6 +320,8 @@ NSString *getAdString(NSString *description) {
|
|||
return @"carousel_footered_layout";
|
||||
if ([description containsString:@"carousel_headered_layout"])
|
||||
return @"carousel_headered_layout";
|
||||
if ([description containsString:@"eml.expandable_metadata"])
|
||||
return @"eml.expandable_metadata";
|
||||
if ([description containsString:@"feed_ad_metadata"])
|
||||
return @"feed_ad_metadata";
|
||||
if ([description containsString:@"full_width_portrait_image_layout"])
|
||||
|
|
|
|||
Loading…
Reference in a new issue