@@ -102,15 +102,11 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
102102%end
103103
104104%hook YTAdsInnerTubeContextDecorator
105- - (void )decorateContext:(id )context {}
105+ - (void )decorateContext:(id )context { %orig ( nil ); }
106106%end
107107
108108%hook YTAccountScopedAdsInnerTubeContextDecorator
109- - (void )decorateContext:(id )context {}
110- %end
111-
112- %hook YTIPlayerResponse
113- - (BOOL )isMonetized { return NO ; }
109+ - (void )decorateContext:(id )context { %orig (nil ); }
114110%end
115111
116112%hook YTLocalPlaybackController
@@ -191,17 +187,6 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
191187}
192188%end
193189
194- // Premium
195- %hook YTColdConfig
196- - (BOOL )cxClientDisableMementoPromotions { return YES ; }
197- %end
198-
199- %hook YTHotConfig
200- - (BOOL )iosPlayerClientSharedConfigShowPipClingPromo { return NO ; }
201- - (BOOL )liveChatEnableEngagementPanelPromo { return NO ; }
202- - (BOOL )livestreamClientConfigEnableCreationModesPromosTriggered { return NO ; }
203- %end
204-
205190// NoYTPremium - @PoomSmart https://github.com/PoomSmart/NoYTPremium
206191// Alert
207192%hook YTCommerceEventGroupHandler
@@ -245,126 +230,4 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
245230// Survey
246231%hook YTSurveyController
247232- (void )showSurveyWithRenderer:(id )arg1 surveyParentResponder:(id )arg2 {}
248- %end
249-
250- // Hide AI things
251- %hook YTShortsSharedGalleryPresentationView
252- - (BOOL )shouldShowAiMontageButton { return NO ; }
253- %end
254-
255- %hook YTShortsSharedGalleryPresentationViewController
256- - (BOOL )shouldShowAiMontageButton { return NO ; }
257- %end
258-
259- %hook YTVideoSubtitleView
260- - (BOOL )shouldShowAdBadge { return NO ; }
261- %end
262-
263- %hook YTIPlayerCompanionAdsSupportedRenderers
264- - (BOOL )hasAppPromoCompanionAdRenderer { return NO ; }
265- %end
266-
267- %hook YTIRenderer
268- - (id )appPromoAdCtaRenderer { return nil ; }
269- - (BOOL )hasAppPromoAdCtaRenderer { return NO ; }
270- %end
271-
272- %hook YTIInStreamPlayerCtaAdsSupportedRenderers
273- - (BOOL )hasAppPromoAdCtaRenderer { return NO ; }
274- %end
275-
276- %hook YTInterstitialPromoViewController
277- - (void )showInterstitialPromo:(id )arg1 enableClientImpressionThrottling:(BOOL )arg2 interstitialParentResponder:(id )arg3 {}
278- - (void )showInterstitialPromo:(id )arg1 interstitialParentResponder:(id )arg2 {}
279- %end
280-
281- %hook YTMealbarPromoController
282- - (id )promoRenderer { return nil ; }
283- - (void )showMealbarPromoWithEvent:(id )arg {}
284- %end
285-
286- %hook YTOfflineButtonPromoController
287- - (void )showOfflinePromoWithRenderer:(id )arg1 endpoint:(id )arg2 parentResponder:(id )arg3 {}
288- %end
289-
290- %hook YTOfflineButtonPromoView
291- - (id )initWithFrame:(CGRect)arg1 renderer:(id )arg2 attributedView:(id )arg3 formattedStringLabelDelegate:(id )arg4 offlineButtonPromoDelegate:(id )arg5 { return nil ; }
292- %end
293-
294- %hook YTWatchMiniBarControlsView
295- - (void )setTitle:(id )arg1 byline:(id )arg2 showingPaidPromotion:(BOOL )arg3 showingPremiumBadge:(BOOL )arg4 {}
296- %end
297-
298- %hook MDXFeatureFlags
299- - (BOOL )areMementoPromotionsEnabled { return NO ; }
300- %end
301-
302- %hook YTUserDefaults
303- - (BOOL )enablePromoDebugToast { return NO ; }
304- - (BOOL )isPromoForced { return NO ; }
305- %end
306-
307- %hook YTAppMealbarPromoController
308- - (id )mealbarPromoController { return nil ; }
309- %end
310-
311- %hook YTAppMealbarPromoControllerImpl
312- - (id )mealbarPromoController { return nil ; }
313- %end
314-
315- %hook YTSurveyPromosheet
316- - (id )expandablePromosheetDelegate { return nil ; }
317- - (void )setExpandablePromosheetDelegate:(id )arg {}
318- %end
319-
320- %hook YTSPromotionServiceBlockImpl
321- - (BOOL )createPromotion:(id )arg1 writer:(id )arg2 error:(NSError **)arg3 { return NO ; }
322- %end
323-
324- %hook YTSPromotionServiceBlock
325- - (BOOL )createPromotion:(id )arg1 writer:(id )arg2 error:(NSError **)arg3 { return NO ; }
326- %end
327-
328- %hook YTPromosheetController
329- - (BOOL )canPresentPromosheetWithGlobalThrottling:(BOOL )arg1 customizedThrottling:(id )arg2 shouldReplacePromosheet:(BOOL )arg3 { return NO ; }
330- - (void )setCurrentPromosheet:(id )arg {}
331- %end
332-
333- %hook YTWatchSurveyTriggerController
334- - (id )initWithParentResponder:(id )arg1 promosheetController:(id )arg2 { return nil ; }
335- %end
336-
337- %hook YTShareMainView
338- - (BOOL )shouldShowPromo { return NO ; }
339- - (void )setPromoView:(id )arg {}
340- %end
341-
342- %hook YCHLiveChatActionPanelView
343- - (BOOL )shouldShowUpsellButton { return NO ; }
344- %end
345-
346- %hook YTPromosheetContainerView
347- - (BOOL )shouldShowExpandButton { return NO ; }
348- - (void )setPromosheet:(id )arg {}
349- - (void )setPromosheetDisplayed:(BOOL )arg {}
350- - (void )setPromosheet:(id )arg1 animated:(BOOL )arg2 completion:(id )arg3 {}
351- %end
352-
353- %hook ELMPBShowBottomSheetCommand
354- - (void )showMealbarPromoWithContainerView:(id )arg1 handler:(id )arg2 {}
355- %end
356-
357- %hook YTIElementRenderer
358- - (NSData *)elementData {
359- NSString *description = [self description ];
360- NSString *adString = getAdString (description);
361- if (adString) return [NSData data ];
362- // NSArray *shortsToRemove = @[@"shorts_shelf.eml", @"shorts_video_cell.eml", @"6Shorts", @"eml.shorts-shelf"];
363- // for (NSString *shorts in shortsToRemove) {
364- // if (IS_ENABLED(HideShortsShelf) && [description containsString:shorts] && ![description containsString:@"history*"]) {
365- // return nil;
366- // }
367- // }
368- return %orig ;
369- }
370233%end
0 commit comments