mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-20 19:12:06 +00:00
Hide search ads by @PoomSmart
This commit is contained in:
parent
1150659ea1
commit
881d6292aa
1 changed files with 24 additions and 0 deletions
24
uYouPlus.xm
24
uYouPlus.xm
|
|
@ -21,6 +21,7 @@
|
|||
#import "Tweaks/YouTubeHeader/YTReelPlayerBottomButton.h"
|
||||
#import "Tweaks/YouTubeHeader/YTReelPlayerViewController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTAlertView.h"
|
||||
#import "Tweaks/YouTubeHeader/YTIElementRenderer.h"
|
||||
|
||||
// Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f
|
||||
NSBundle *uYouPlusBundle() {
|
||||
|
|
@ -208,6 +209,29 @@ BOOL dontEatMyContent() {
|
|||
}
|
||||
%end
|
||||
|
||||
// Hide search ads by @PoomSmart - https://github.com/PoomSmart/YouTube-X
|
||||
BOOL didLateHook = NO;
|
||||
|
||||
%group LateHook
|
||||
%hook YTIElementRenderer
|
||||
- (NSData *)elementData {
|
||||
if (self.hasCompatibilityOptions && self.compatibilityOptions.hasAdLoggingData)
|
||||
return nil;
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
%hook YTSectionListViewController
|
||||
- (void)loadWithModel:(id)model {
|
||||
if (!didLateHook) {
|
||||
%init(LateHook);
|
||||
didLateHook = YES;
|
||||
}
|
||||
%orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/94
|
||||
%hook UIResponder
|
||||
%new
|
||||
|
|
|
|||
Loading…
Reference in a new issue