Merge pull request #391 from bhackel/fix/hide-prev-next-buttons

Fix/hide prev next buttons
This commit is contained in:
arichornlover 2024-02-25 18:59:14 -06:00 committed by GitHub
commit f433e884b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 19 deletions

View file

@ -70,7 +70,7 @@
"HIDE_CHANNEL_WATERMARK_DESC" = "";
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Hide previous and next buttons";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Hides on all videos, including playlists";
"REPLACE_PREVIOUS_NEXT_BUTTON" = "Use fast forward and rewind buttons";
"REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "Replaces previous and next buttons with fast forward and rewind";

View file

@ -85,7 +85,7 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
"HIDE_CHANNEL_WATERMARK_DESC" = "";
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Hide previous and next buttons";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Hides on all videos, including playlists";
"REPLACE_PREVIOUS_NEXT_BUTTON" = "Use fast forward and rewind buttons";
"REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "Replaces previous and next buttons with fast forward and rewind";

View file

@ -617,26 +617,15 @@ static NSString *accessGroupID() {
}
%end
// Hide Next & Previous button
%group gHidePreviousAndNextButton
%hook YTColdConfig
- (BOOL)removeNextPaddleForAllVideos { return YES; }
- (BOOL)removeNextPaddleForSingletonVideos { return YES; }
- (BOOL)removePreviousPaddleForSingletonVideos { return YES; }
- (BOOL)removePreviousPaddleForAllVideos { return YES; }
- (BOOL)removeNextPaddleForAllVideos {
return YES;
}
- (BOOL)removePreviousPaddleForAllVideos {
return YES;
}
%end
// %hook YTMainAppControlsOverlayView // this is only used for v16.xx.x (issues if using with YouTube v17.xx.x up to latest)
// - (void)layoutSubviews { // hide Next & Previous legacy buttons
// %orig;
// if (IsEnabled(@"hidePreviousAndNextButton_enabled")) {
// MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
// MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
// MSHookIvar<YTTransportControlsButtonView *>(self, "_nextButtonView").hidden = YES;
// MSHookIvar<YTTransportControlsButtonView *>(self, "_previousButtonView").hidden = YES;
// }
// }
// %end
%end
// Hide Dark Overlay Background