mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-21 18:48:45 -04:00
removed duplicate tweaks already in YTLite
This commit is contained in:
@@ -236,55 +236,6 @@ static BOOL IsEnabled(NSString *key) {
|
||||
%end
|
||||
%end
|
||||
|
||||
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
||||
%hook YTCommerceEventGroupHandler
|
||||
- (void)addEventHandlers {}
|
||||
%end
|
||||
|
||||
%hook YTInterstitialPromoEventGroupHandler
|
||||
- (void)addEventHandlers {}
|
||||
%end
|
||||
|
||||
%hook YTPromosheetEventGroupHandler
|
||||
- (void)addEventHandlers {}
|
||||
%end
|
||||
|
||||
%hook YTPromoThrottleController
|
||||
- (BOOL)canShowThrottledPromo { return NO; }
|
||||
- (BOOL)canShowThrottledPromoWithFrequencyCap:(id)arg1 { return NO; }
|
||||
- (BOOL)canShowThrottledPromoWithFrequencyCaps:(id)arg1 { return NO; }
|
||||
%end
|
||||
|
||||
%hook YTIShowFullscreenInterstitialCommand
|
||||
- (BOOL)shouldThrottleInterstitial { return YES; }
|
||||
%end
|
||||
|
||||
%hook YTSurveyController
|
||||
- (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {}
|
||||
%end
|
||||
|
||||
// YTShortsProgress - @PoomSmart - https://github.com/PoomSmart/YTShortsProgress
|
||||
%hook YTReelPlayerViewController
|
||||
- (BOOL)shouldEnablePlayerBar { return YES; }
|
||||
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
||||
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
||||
%end
|
||||
|
||||
%hook YTReelPlayerViewControllerSub
|
||||
- (BOOL)shouldEnablePlayerBar { return YES; }
|
||||
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
||||
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
||||
%end
|
||||
|
||||
%hook YTColdConfig
|
||||
- (BOOL)iosEnableVideoPlayerScrubber { return YES; }
|
||||
- (BOOL)mobileShortsTabInlined { return YES; }
|
||||
%end
|
||||
|
||||
%hook YTHotConfig
|
||||
- (BOOL)enablePlayerBarForVerticalVideoWhenControlsHiddenInFullscreen { return YES; }
|
||||
%end
|
||||
|
||||
// YTNoModernUI - @arichorn
|
||||
%group gYTNoModernUI
|
||||
%hook YTVersionUtils // YTNoModernUI Version
|
||||
@@ -429,23 +380,6 @@ static BOOL IsEnabled(NSString *key) {
|
||||
- (BOOL)isPromptForLocalNetworkPermissionsEnabled { return NO; }
|
||||
%end
|
||||
|
||||
// YTClassicVideoQuality - https://github.com/PoomSmart/YTClassicVideoQuality
|
||||
%hook YTVideoQualitySwitchControllerFactory
|
||||
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder {
|
||||
Class originalClass = %c(YTVideoQualitySwitchOriginalController);
|
||||
return originalClass ? [[originalClass alloc] initWithParentResponder:responder] : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// YTNoHoverCards: https://github.com/level3tjg/YTNoHoverCards
|
||||
%hook YTCreatorEndscreenView
|
||||
- (void)setHidden:(BOOL)hidden {
|
||||
if (IsEnabled(@"hideHoverCards_enabled"))
|
||||
hidden = YES;
|
||||
%orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo
|
||||
%hook YTMainAppVideoPlayerOverlayViewController
|
||||
- (void)setPaidContentWithPlayerData:(id)data {
|
||||
@@ -679,32 +613,6 @@ static void replaceTab(YTIGuideResponse *response) {
|
||||
%end
|
||||
%end
|
||||
|
||||
// Hide YouTube annoying banner in Home page? - @MiRO92 - YTNoShorts: https://github.com/MiRO92/YTNoShorts
|
||||
%hook YTAsyncCollectionView
|
||||
- (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (IsEnabled(@"hideShorts_enabled")) {
|
||||
UICollectionViewCell *cell = %orig;
|
||||
if ([cell isKindOfClass:NSClassFromString(@"_ASCollectionViewCell")]) {
|
||||
_ASCollectionViewCell *cell = %orig;
|
||||
if ([cell respondsToSelector:@selector(node)]) {
|
||||
if ([[[cell node] accessibilityIdentifier] isEqualToString:@"eml.shorts-shelf"]) {
|
||||
[self removeShortsCellAtIndexPath:indexPath];
|
||||
}
|
||||
}
|
||||
} else if ([cell isKindOfClass:NSClassFromString(@"YTReelShelfCell")]) {
|
||||
[self removeShortsCellAtIndexPath:indexPath];
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
|
||||
%new
|
||||
- (void)removeShortsCellAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
|
||||
}
|
||||
%end
|
||||
|
||||
// YTSpeed - https://github.com/Lyvendia/YTSpeed
|
||||
%group gYTSpeed
|
||||
%hook YTVarispeedSwitchController
|
||||
|
Reference in New Issue
Block a user