mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 07:41:59 +00:00
Hide Get Youtube Premium
This commit is contained in:
parent
4095dabcb1
commit
3738ed19bb
3 changed files with 31 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
#import "Tweaks/YouTubeHeader/YTInlinePlayerBarContainerView.h"
|
#import "Tweaks/YouTubeHeader/YTInlinePlayerBarContainerView.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTInnerTubeCollectionViewController.h"
|
#import "Tweaks/YouTubeHeader/YTInnerTubeCollectionViewController.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTPivotBarItemView.h"
|
#import "Tweaks/YouTubeHeader/YTPivotBarItemView.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTCollectionViewCell.h"
|
||||||
|
|
||||||
// Hide buttons under the video player by @PoomSmart
|
// Hide buttons under the video player by @PoomSmart
|
||||||
#import "Tweaks/YouTubeHeader/ASCollectionElement.h"
|
#import "Tweaks/YouTubeHeader/ASCollectionElement.h"
|
||||||
|
|
@ -64,6 +65,13 @@
|
||||||
@property(readonly, nonatomic) YTIIcon *iconImage;
|
@property(readonly, nonatomic) YTIIcon *iconImage;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
// Hide Premium Promo in You tab - @bhackel
|
||||||
|
@interface YTFormattedStringLabel : UILabel
|
||||||
|
@end
|
||||||
|
@interface YTLinkCell : YTCollectionViewCell
|
||||||
|
@property(readonly, nonatomic) YTFormattedStringLabel *titleLabel;
|
||||||
|
@end
|
||||||
|
|
||||||
// uYouPlus
|
// uYouPlus
|
||||||
@interface YTHeaderLogoController : UIView
|
@interface YTHeaderLogoController : UIView
|
||||||
@property(readonly, nonatomic) long long pageStyle;
|
@property(readonly, nonatomic) long long pageStyle;
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,25 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
- (BOOL)savedSettingShouldExpire { return NO; }
|
- (BOOL)savedSettingShouldExpire { return NO; }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// Hide Premium promos in "You" and "Library" tab - @bhackel
|
||||||
|
%group gHidePremiumPromos
|
||||||
|
// Hide "Get Youtube Premium" in the "You" tab
|
||||||
|
%hook YTLinkCell
|
||||||
|
- (void)layoutSubviews {
|
||||||
|
%orig;
|
||||||
|
// Get the text label object for this cell
|
||||||
|
YTFormattedStringLabel *label = self.titleLabel;
|
||||||
|
// Check if the cell is a premium promo
|
||||||
|
if ([label.accessibilityLabel isEqualToString:@"Get YouTube Premium"]) {
|
||||||
|
// Hide the cell
|
||||||
|
self.hidden = YES;
|
||||||
|
self.frame = CGRectZero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
|
|
||||||
// YTShortsProgress - https://github.com/PoomSmart/YTShortsProgress/
|
// YTShortsProgress - https://github.com/PoomSmart/YTShortsProgress/
|
||||||
%hook YTShortsPlayerViewController
|
%hook YTShortsPlayerViewController
|
||||||
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
||||||
|
|
@ -1322,6 +1341,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
||||||
if (IS_ENABLED(@"YTTapToSeek_enabled")) {
|
if (IS_ENABLED(@"YTTapToSeek_enabled")) {
|
||||||
%init(YTTTS_Tweak);
|
%init(YTTTS_Tweak);
|
||||||
}
|
}
|
||||||
|
if (IS_ENABLED(@"hidePremiumPromos_enabled")) {
|
||||||
|
%init(gHidePremiumPromos);
|
||||||
|
}
|
||||||
|
|
||||||
// YTNoModernUI - @arichorn
|
// YTNoModernUI - @arichorn
|
||||||
BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled");
|
BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled");
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,7 @@ extern NSBundle *uYouPlusBundle();
|
||||||
SWITCH_ITEM2(LOC(@"Hide `Your data in YouTube` Section"), LOC(@"App restart is required."), @"disableYourDataInYouTubeSection_enabled");
|
SWITCH_ITEM2(LOC(@"Hide `Your data in YouTube` Section"), LOC(@"App restart is required."), @"disableYourDataInYouTubeSection_enabled");
|
||||||
SWITCH_ITEM2(LOC(@"Hide `Privacy` Section"), LOC(@"App restart is required."), @"disablePrivacySection_enabled");
|
SWITCH_ITEM2(LOC(@"Hide `Privacy` Section"), LOC(@"App restart is required."), @"disablePrivacySection_enabled");
|
||||||
SWITCH_ITEM2(LOC(@"Hide `Live Chat` Section"), LOC(@"App restart is required."), @"disableLiveChatSection_enabled");
|
SWITCH_ITEM2(LOC(@"Hide `Live Chat` Section"), LOC(@"App restart is required."), @"disableLiveChatSection_enabled");
|
||||||
|
SWITCH_ITEM2(LOC(@"Hide Premium Promos"), LOC(@"App restart is required."), @"hidePremiumPromos_enabled");
|
||||||
|
|
||||||
# pragma mark - UI interface options
|
# pragma mark - UI interface options
|
||||||
SECTION_HEADER(LOC(@"UI Interface Options"));
|
SECTION_HEADER(LOC(@"UI Interface Options"));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue