uYouEnhanced/Sources/YTNoPaidPromo.x.bak
aric3435 (INACTIVE) 35e97ea8dd
Updated a lot of uYouEnhanced Code. (v19.40.4-3.0.4)
This release also includes all of the new changes from qnblackcat/uYouPlus.
and the App Version Spoofer has finally been updated again!
2024-10-10 00:40:33 -05:00

22 lines
800 B
Text

#import <YouTubeHeader/YTPlayerOverlayProvider.h>
#import <YouTubeHeader/YTPlayerOverlay.h>
#import "uYouPlus.h"
// YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo
%hook YTMainAppVideoPlayerOverlayViewController
- (void)setPaidContentWithPlayerData:(id)data {
if (IS_ENABLED(kHidePaidPromotionCard)) {}
else { return %orig; }
}
- (void)playerOverlayProvider:(YTPlayerOverlayProvider *)provider didInsertPlayerOverlay:(YTPlayerOverlay *)overlay {
if ([[overlay overlayIdentifier] isEqualToString:@"player_overlay_paid_content"] && IS_ENABLED(kHidePaidPromotionCard)) return;
%orig;
}
%end
%hook YTInlineMutedPlaybackPlayerOverlayViewController
- (void)setPaidContentWithPlayerData:(id)data {
if (IS_ENABLED(kHidePaidPromotionCard)) {}
else { return %orig; }
}
%end