@@ -30,6 +30,7 @@ NSBundle *uYouPlusBundle() {
30
30
}
31
31
NSBundle *tweakBundle = uYouPlusBundle();
32
32
33
+ // Keychain patching
33
34
static NSString *accessGroupID () {
34
35
NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
35
36
(__bridge NSString *)kSecClassGenericPassword , (__bridge NSString *)kSecClass ,
@@ -93,6 +94,9 @@ BOOL hidePaidPromotionCard() {
93
94
BOOL fixGoogleSigin () {
94
95
return [[NSUserDefaults standardUserDefaults ] boolForKey: @" fixGoogleSigin_enabled" ];
95
96
}
97
+ BOOL replacePreviousAndNextButton () {
98
+ return [[NSUserDefaults standardUserDefaults ] boolForKey: @" replacePreviousAndNextButton_enabled" ];
99
+ }
96
100
97
101
# pragma mark - Tweaks
98
102
// Enable Reorder videos from playlist while on the Watch page - @PoomSmart
@@ -114,7 +118,7 @@ BOOL fixGoogleSigin() {
114
118
}
115
119
%end
116
120
117
- // Hide CC / Autoplay switch / Next & Previous button
121
+ // Hide CC / Autoplay switch
118
122
%hook YTMainAppControlsOverlayView
119
123
- (void )setClosedCaptionsOrSubtitlesButtonAvailable:(BOOL )arg1 { // hide CC button
120
124
if (hideCC ()) { return %orig (NO ); }
@@ -124,15 +128,22 @@ BOOL fixGoogleSigin() {
124
128
if (hideAutoplaySwitch ()) {}
125
129
else { return %orig ; }
126
130
}
127
- - (void )layoutSubviews { // hide Next & Previous button
128
- %orig ;
129
- if (hidePreviousAndNextButton ()) {
130
- MSHookIvar<YTMainAppControlsOverlayView *>(self, " _nextButton" ).hidden = YES ;
131
- MSHookIvar<YTMainAppControlsOverlayView *>(self, " _previousButton" ).hidden = YES ;
132
- MSHookIvar<YTTransportControlsButtonView *>(self, " _nextButtonView" ).hidden = YES ;
133
- MSHookIvar<YTTransportControlsButtonView *>(self, " _previousButtonView" ).hidden = YES ;
134
- }
135
- }
131
+ %end
132
+
133
+ // Hide Next & Previous button
134
+ %group gHidePreviousAndNextButton
135
+ %hook YTColdConfig
136
+ - (BOOL )removeNextPaddleForSingletonVideos { return YES ; }
137
+ - (BOOL )removePreviousPaddleForSingletonVideos { return YES ; }
138
+ %end
139
+ %end
140
+
141
+ // Replace Next & Previous button with Fast forward & Rewind button
142
+ %group gReplacePreviousAndNextButton
143
+ %hook YTColdConfig
144
+ - (BOOL )replaceNextPaddleWithFastForwardButtonForSingletonVods { return YES ; }
145
+ - (BOOL )replacePreviousPaddleWithRewindButtonForSingletonVods { return YES ; }
146
+ %end
136
147
%end
137
148
138
149
// Hide HUD Messages
@@ -250,6 +261,7 @@ BOOL fixGoogleSigin() {
250
261
// YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
251
262
%hook YTColdConfig
252
263
- (BOOL )respectDeviceCaptionSetting { return NO ; }
264
+ - (BOOL )isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES ; }
253
265
%end
254
266
255
267
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
@@ -350,9 +362,9 @@ BOOL fixGoogleSigin() {
350
362
// Prevent uYou player bar from showing when not playing downloaded media
351
363
%hook PlayerManager
352
364
- (void )pause {
353
- if (isnan ([self progress ]))
354
- return ;
355
- %orig ;
365
+ if (isnan ([self progress ]))
366
+ return ;
367
+ %orig ;
356
368
}
357
369
%end
358
370
@@ -874,6 +886,12 @@ static void replaceTab(YTIGuideResponse *response) {
874
886
if (bigYTMiniPlayer () && (UIDevice.currentDevice .userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
875
887
%init (Main);
876
888
}
889
+ if (hidePreviousAndNextButton ()) {
890
+ %init (gHidePreviousAndNextButton );
891
+ }
892
+ if (replacePreviousAndNextButton ()) {
893
+ %init (gReplacePreviousAndNextButton );
894
+ }
877
895
if (@available (iOS 16 , *)) {
878
896
%init (iOS16);
879
897
}
0 commit comments