12
12
#import " Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
13
13
#import " Tweaks/YouTubeHeader/YTIBrowseRequest.h"
14
14
#import " Tweaks/YouTubeHeader/YTCommonColorPalette.h"
15
- #import " Tweaks/YouTubeHeader/YTColorPalette.h"
16
15
#import " Tweaks/YouTubeHeader/ASCollectionView.h"
17
16
#import " Tweaks/YouTubeHeader/YTPlayerOverlay.h"
18
17
#import " Tweaks/YouTubeHeader/YTPlayerOverlayProvider.h"
@@ -202,23 +201,23 @@ BOOL hidePaidPromotionCard() {
202
201
// Workaround for MiRO92/uYou-for-YouTube#12, qnblackcat/uYouPlus#263
203
202
%hook YTDataUtils
204
203
+ (NSMutableDictionary *)spamSignalsDictionary {
205
- return nil ;
204
+ return nil ;
206
205
}
207
206
%end
208
207
209
208
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/94
210
209
%hook UIResponder
211
210
%new
212
211
- (id )entry {
213
- return nil ;
212
+ return nil ;
214
213
}
215
214
%end
216
215
217
216
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/140
218
217
%hook YTLocalPlaybackController
219
218
%new
220
219
- (id )activeVideoController {
221
- return [self activeVideo ];
220
+ return [self activeVideo ];
222
221
}
223
222
%end
224
223
@@ -248,7 +247,6 @@ BOOL hidePaidPromotionCard() {
248
247
// YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
249
248
%hook YTColdConfig
250
249
- (BOOL )respectDeviceCaptionSetting { return NO ; }
251
- - (BOOL )shouldUseAppThemeSetting { return YES ; } // v16.xx
252
250
%end
253
251
254
252
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
@@ -287,10 +285,6 @@ BOOL hidePaidPromotionCard() {
287
285
- (void )setUserInteractionEnabled:(BOOL )enabled { %orig (YES ); }
288
286
%end
289
287
290
- %hook YTReelPlayerViewControllerSub // v16.42.3 - @level3tjg: https://reddit.com/r/jailbreak/comments/v29yvk/_/iasl1l0/
291
- - (BOOL )shouldEnablePlayerBar { return YES ; }
292
- %end
293
-
294
288
// Workaround for issue #54
295
289
%hook YTMainAppVideoPlayerOverlayViewController
296
290
- (void )updateRelatedVideos {
@@ -302,10 +296,10 @@ BOOL hidePaidPromotionCard() {
302
296
// Workaround for qnblackcat/uYouPlus#253, qnblackcat/uYouPlus#170
303
297
%hook YTReelWatchPlaybackOverlayView
304
298
- (YTQTMButton *)overflowButton {
305
- if ([self respondsToSelector: @selector (orderedRightSideButtons )] &&
306
- [self orderedRightSideButtons ].count != 0 )
307
- return [self orderedRightSideButtons ][0 ];
308
- return %orig ;
299
+ if ([self respondsToSelector: @selector (orderedRightSideButtons )] &&
300
+ [self orderedRightSideButtons ].count != 0 )
301
+ return [self orderedRightSideButtons ][0 ];
302
+ return %orig ;
309
303
}
310
304
%end
311
305
@@ -317,32 +311,31 @@ BOOL hidePaidPromotionCard() {
317
311
attribute:(NSLayoutAttribute )attr2
318
312
multiplier:(CGFloat)multiplier
319
313
constant:(CGFloat)c {
320
- if (![view1 isKindOfClass: %c (YTReelPlayerBottomButton)] &&
321
- ![view1.accessibilityIdentifier isEqualToString: @" com.miro.uyou" ])
322
- return %orig ;
323
- if (!view2) {
324
- view1.hidden = YES ;
314
+ if (![view1 isKindOfClass: %c (YTReelPlayerBottomButton)] &&
315
+ ![view1.accessibilityIdentifier isEqualToString: @" com.miro.uyou" ])
316
+ return %orig ;
317
+ if (!view2) {
318
+ view1.hidden = YES ;
325
319
return [NSLayoutConstraint alloc ];
326
- }
327
- YTReelPlayerBottomButton *uYouButton = (YTReelPlayerBottomButton *)view1;
328
- YTReelPlayerBottomButton *topButton = (YTReelPlayerBottomButton *)view2;
329
- NSString *uYouButtonTitle =
330
- [view2.accessibilityIdentifier isEqualToString: @" com.miro.uyou" ]
331
- ? @" uYou"
332
- : @" uYouLocal" ;
333
- uYouButton.accessibilityLabel = uYouButtonTitle;
334
- uYouButton.uppercaseTitle = NO ;
335
- [uYouButton setTitle: uYouButtonTitle forState: UIControlStateNormal];
336
- [uYouButton
337
- setTitleTypeKind: MSHookIvar<NSInteger >(topButton, " _typeKind" )
320
+ }
321
+ YTReelPlayerBottomButton *uYouButton = (YTReelPlayerBottomButton *)view1;
322
+ YTReelPlayerBottomButton *topButton = (YTReelPlayerBottomButton *)view2;
323
+ NSString *uYouButtonTitle =
324
+ [view2.accessibilityIdentifier isEqualToString: @" com.miro.uyou" ]
325
+ ? @" uYou"
326
+ : @" uYouLocal" ;
327
+ uYouButton.accessibilityLabel = uYouButtonTitle;
328
+ uYouButton.uppercaseTitle = NO ;
329
+ [uYouButton setTitle: uYouButtonTitle forState: UIControlStateNormal];
330
+ [uYouButton
331
+ setTitleTypeKind: MSHookIvar<NSInteger >(topButton, " _typeKind" )
338
332
typeVariant: MSHookIvar<NSInteger >(topButton, " _typeVariant" )];
339
- uYouButton.applyRightSideLayoutImageSize =
340
- topButton.applyRightSideLayoutImageSize ;
341
- uYouButton.buttonImageTitlePadding = topButton.buttonImageTitlePadding ;
342
- uYouButton.buttonLayoutStyle = topButton.buttonLayoutStyle ;
343
- uYouButton.sizeWithPaddingAndInsets = topButton.sizeWithPaddingAndInsets ;
344
- uYouButton.verticalContentPadding = topButton.verticalContentPadding ;
345
- return %orig ;
333
+ uYouButton.applyRightSideLayoutImageSize = topButton.applyRightSideLayoutImageSize ;
334
+ uYouButton.buttonImageTitlePadding = topButton.buttonImageTitlePadding ;
335
+ uYouButton.buttonLayoutStyle = topButton.buttonLayoutStyle ;
336
+ uYouButton.sizeWithPaddingAndInsets = topButton.sizeWithPaddingAndInsets ;
337
+ uYouButton.verticalContentPadding = topButton.verticalContentPadding ;
338
+ return %orig ;
346
339
}
347
340
%end
348
341
@@ -441,6 +434,14 @@ BOOL hidePaidPromotionCard() {
441
434
}
442
435
%end
443
436
437
+ %hook APMAEU
438
+ + (BOOL )isFAS { return YES ; }
439
+ %end
440
+
441
+ %hook GULAppEnvironmentUtil
442
+ + (BOOL )isFromAppStore { return YES ; }
443
+ %end
444
+
444
445
%hook NSBundle
445
446
- (NSString *)bundleIdentifier {
446
447
NSArray *address = [NSThread callStackReturnAddresses ];
@@ -543,39 +544,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
543
544
}
544
545
%end
545
546
546
- %hook YTColorPalette // v16.42.3
547
- - (UIColor *)brandBackgroundSolid {
548
- if (self.pageStyle == 1 ) {
549
- return [UIColor blackColor ];
550
- }
551
- return %orig ;
552
- }
553
- - (UIColor *)brandBackgroundPrimary {
554
- if (self.pageStyle == 1 ) {
555
- return [UIColor blackColor ];
556
- }
557
- return %orig ;
558
- }
559
- - (UIColor *)brandBackgroundSecondary {
560
- if (self.pageStyle == 1 ) {
561
- return [[UIColor blackColor ] colorWithAlphaComponent: 0.9 ];
562
- }
563
- return %orig ;
564
- }
565
- - (UIColor *)staticBrandBlack {
566
- if (self.pageStyle == 1 ) {
567
- return [UIColor blackColor ];
568
- }
569
- return %orig ;
570
- }
571
- - (UIColor *)generalBackgroundA {
572
- if (self.pageStyle == 1 ) {
573
- return [UIColor blackColor ];
574
- }
575
- return %orig ;
576
- }
577
- %end
578
-
579
547
// Account view controller
580
548
%hook YTAccountPanelBodyViewController
581
549
- (UIColor *)backgroundColor:(NSInteger )pageStyle {
@@ -601,7 +569,7 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
601
569
- (void )didMoveToWindow {
602
570
%orig ;
603
571
if (isDarkMode () && [self .nextResponder isKindOfClass: %c (_ASDisplayView)]) {
604
- self.superview .backgroundColor = [UIColor clearColor ];
572
+ self.superview .backgroundColor = [UIColor blackColor ];
605
573
}
606
574
}
607
575
%end
@@ -726,7 +694,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
726
694
if ([self .accessibilityIdentifier isEqualToString: @" rich_header" ]) { self.backgroundColor = [UIColor blackColor ]; }
727
695
if ([self .accessibilityIdentifier isEqualToString: @" id.ui.comment_cell" ]) { self.backgroundColor = [UIColor blackColor ]; }
728
696
if ([self .accessibilityIdentifier isEqualToString: @" id.ui.cancel.button" ]) { self.superview .backgroundColor = [UIColor clearColor ]; }
729
- if ([self .accessibilityIdentifier isEqualToString: @" id.elements.components.filter_chip_bar" ]) { self.backgroundColor = [UIColor blackColor ]; }
730
697
if ([self .accessibilityIdentifier isEqualToString: @" id.elements.components.comment_composer" ]) { self.backgroundColor = [UIColor blackColor ]; }
731
698
if ([self .accessibilityIdentifier isEqualToString: @" id.elements.components.video_list_entry" ]) { self.backgroundColor = [UIColor blackColor ]; }
732
699
if ([self .accessibilityIdentifier isEqualToString: @" id.comment.guidelines_text" ]) { self.superview .backgroundColor = [UIColor blackColor ]; }
0 commit comments