Skip to content

Commit

Permalink
Fix hide iSponsorBlock option
Browse files Browse the repository at this point in the history
  • Loading branch information
therealFoxster committed Jan 27, 2024
1 parent 7b0098c commit af08221
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Sources/uYouPlus.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
- (void)confirmAlertDidPressConfirm;
@end

// Hide iSponsorBlock
@interface YTRightNavigationButtons : UIView
@property (nonatomic, readwrite, strong) UIView *sponsorBlockButton;
@end

// Hide YouTube annoying banner in Home page? - @MiRO92 - YTNoShorts: https://github.com/MiRO92/YTNoShorts
@interface _ASCollectionViewCell : UICollectionViewCell
- (id)node;
Expand Down
6 changes: 3 additions & 3 deletions Sources/uYouPlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ NSBundle *tweakBundle = uYouPlusBundle();

// Hide iSponsorBlock
%hook YTRightNavigationButtons
- (void)setSponsorBlockButton:(id)sponsorBlockButton {
if (IS_ENABLED(@"hideiSponsorBlockButton_enabled"))
return;
- (void)layoutSubviews {
%orig;
if (IS_ENABLED(@"hideiSponsorBlockButton_enabled"))
self.sponsorBlockButton.hidden = YES;
}
%end

Expand Down

0 comments on commit af08221

Please sign in to comment.