Fix AdBlock Workaround (Lite) Option

This commit is contained in:
arichornlover 2024-05-18 01:01:57 -05:00 committed by GitHub
parent 312c1a11ce
commit fb835a25fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -87,8 +87,29 @@ static int contrastMode() {
}
%end
// uYou AdBlocking Workaround LITE (This Version will only remove ads from Videos/Shorts!) - @PoomSmart
// uYou AdBlock Workaround LITE (This Version will only remove ads from Videos/Shorts!) - @PoomSmart
%group uYouAdBlockingWorkaroundLite
%hook YTHotConfig
- (BOOL)disableAfmaIdfaCollection { return NO; }
%end
%hook YTIPlayerResponse
- (BOOL)isMonetized { return NO; }
%end
%hook YTDataUtils
+ (id)spamSignalsDictionary { return @{}; }
+ (id)spamSignalsDictionaryWithoutIDFA { return @{}; }
%end
%hook YTAdsInnerTubeContextDecorator
- (void)decorateContext:(id)context { %orig(nil); }
%end
%hook YTAccountScopedAdsInnerTubeContextDecorator
- (void)decorateContext:(id)context { %orig(nil); }
%end
%hook YTReelInfinitePlaybackDataSource
- (void)setReels:(NSMutableOrderedSet <YTReelModel *> *)reels {
[reels removeObjectsAtIndexes:[reels indexesOfObjectsPassingTest:^BOOL(YTReelModel *obj, NSUInteger idx, BOOL *stop) {
@ -97,17 +118,9 @@ static int contrastMode() {
%orig;
}
%end
%hook YTAdsInnerTubeContextDecorator
- (void)decorateContext:(id)context {}
%end
%hook YTAccountScopedAdsInnerTubeContextDecorator
- (void)decorateContext:(id)context {}
%end
%end
// uYou AdBlocking Workaround (for uYou Option) - @PoomSmart
// uYou AdBlock Workaround (for uYou Option) - @PoomSmart
%group uYouAdBlockingWorkaround
// Workaround: uYou 3.0.3 Adblock fix - @PoomSmart
%hook YTReelInfinitePlaybackDataSource