remove uYou welcome screen (#664), red progress bar, disable hints
This commit is contained in:
+26
@@ -6,6 +6,12 @@
|
|||||||
#import "Tweaks/YouTubeHeader/YTSettingsPickerViewController.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsPickerViewController.h"
|
||||||
#import "Header.h"
|
#import "Header.h"
|
||||||
|
|
||||||
|
static BOOL IsEnabled(NSString *key) {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:key];
|
||||||
|
}
|
||||||
|
static int GetSelection(NSString *key) {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] integerForKey:key];
|
||||||
|
}
|
||||||
static const NSInteger uYouPlusSection = 500;
|
static const NSInteger uYouPlusSection = 500;
|
||||||
|
|
||||||
@interface YTSettingsSectionItemManager (uYouPlus)
|
@interface YTSettingsSectionItemManager (uYouPlus)
|
||||||
@@ -166,6 +172,16 @@ extern NSBundle *uYouPlusBundle();
|
|||||||
}
|
}
|
||||||
settingItemId:0],
|
settingItemId:0],
|
||||||
|
|
||||||
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"RED_PROGRESS_BAR")
|
||||||
|
titleDescription:LOC(@"RED_PROGRESS_BAR_DESC")
|
||||||
|
accessibilityIdentifier:nil
|
||||||
|
switchOn:IsEnabled(@"redProgressBar_enabled")
|
||||||
|
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"redProgressBar_enabled"];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
settingItemId:0],
|
||||||
|
|
||||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_HOVER_CARD")
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_HOVER_CARD")
|
||||||
titleDescription:LOC(@"HIDE_HOVER_CARD_DESC")
|
titleDescription:LOC(@"HIDE_HOVER_CARD_DESC")
|
||||||
accessibilityIdentifier:nil
|
accessibilityIdentifier:nil
|
||||||
@@ -333,6 +349,16 @@ extern NSBundle *uYouPlusBundle();
|
|||||||
}
|
}
|
||||||
settingItemId:0],
|
settingItemId:0],
|
||||||
|
|
||||||
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"DISABLE_HINTS")
|
||||||
|
titleDescription:LOC(@"DISABLE_HINTS_DESC")
|
||||||
|
accessibilityIdentifier:nil
|
||||||
|
switchOn:IsEnabled(@"disableHints_enabled")
|
||||||
|
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableHints_enabled"];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
settingItemId:0],
|
||||||
|
|
||||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"FIX_GOOGLE_SIGNIN")
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"FIX_GOOGLE_SIGNIN")
|
||||||
titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC")
|
titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC")
|
||||||
accessibilityIdentifier:nil
|
accessibilityIdentifier:nil
|
||||||
|
|||||||
+38
-10
@@ -61,6 +61,9 @@ static NSString *accessGroupID() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
static BOOL IsEnabled(NSString *key) {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:key];
|
||||||
|
}
|
||||||
static BOOL isDarkMode() {
|
static BOOL isDarkMode() {
|
||||||
return ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1);
|
return ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1);
|
||||||
}
|
}
|
||||||
@@ -439,6 +442,7 @@ BOOL didLateHook = NO;
|
|||||||
- (BOOL)isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES; } // Swipe right to dismiss the right panel in fullscreen mode
|
- (BOOL)isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES; } // Swipe right to dismiss the right panel in fullscreen mode
|
||||||
- (BOOL)mainAppCoreClientIosTransientVisualGlitchInPivotBarFix { return NO; } // Fix uYou's label glitching - qnblackcat/uYouPlus#552
|
- (BOOL)mainAppCoreClientIosTransientVisualGlitchInPivotBarFix { return NO; } // Fix uYou's label glitching - qnblackcat/uYouPlus#552
|
||||||
- (BOOL)enableSwipeToRemoveInPlaylistWatchEp { return YES; } // Enable swipe right to remove video in Playlist.
|
- (BOOL)enableSwipeToRemoveInPlaylistWatchEp { return YES; } // Enable swipe right to remove video in Playlist.
|
||||||
|
- (BOOL)iosEnableShortsPlayerSplitViewController { return NO; } // Fix uYou's button missing in Shorts
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
||||||
@@ -1201,6 +1205,34 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// Disable hints - https://github.com/LillieH001/YouTube-Reborn/blob/v4/
|
||||||
|
%group gDisableHints
|
||||||
|
%hook YTSettings
|
||||||
|
- (BOOL)areHintsDisabled {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
- (void)setHintsDisabled:(BOOL)arg1 {
|
||||||
|
%orig(YES);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook YTUserDefaults
|
||||||
|
- (BOOL)areHintsDisabled {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
- (void)setHintsDisabled:(BOOL)arg1 {
|
||||||
|
%orig(YES);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Bring back the red progress bar
|
||||||
|
%hook YTColdConfig
|
||||||
|
- (BOOL)segmentablePlayerBarUpdateColors {
|
||||||
|
if (IsEnabled(@"redProgressBar_enabled")) { return NO; }
|
||||||
|
else { return %orig; }
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
// Shorts options
|
// Shorts options
|
||||||
%hook YTReelWatchPlaybackOverlayView
|
%hook YTReelWatchPlaybackOverlayView
|
||||||
- (void)setNativePivotButton:(id)arg1 {
|
- (void)setNativePivotButton:(id)arg1 {
|
||||||
@@ -1226,11 +1258,9 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
- (void)layoutSubviews {
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
%orig;
|
||||||
if (IsEnabled(@"hideBuySuperThanks_enabled")) {
|
if ((IsEnabled(@"hideBuySuperThanks_enabled")) && ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.suggested_action"])) { self.hidden = YES; }
|
||||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.suggested_action"]) { self.hidden = YES; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
@@ -1274,10 +1304,14 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
if (IsEnabled(@"oledKeyBoard_enabled")) {
|
if (IsEnabled(@"oledKeyBoard_enabled")) {
|
||||||
%init(gOLEDKB);
|
%init(gOLEDKB);
|
||||||
}
|
}
|
||||||
|
if (IsEnabled(@"disableHints_enabled")) {
|
||||||
|
%init(gDisableHints);
|
||||||
|
}
|
||||||
|
|
||||||
// Disable broken options of uYou
|
// Disable broken options of uYou
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"];
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"];
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"disableAgeRestriction"];
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"disableAgeRestriction"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"showedWelcomeVC"];
|
||||||
|
|
||||||
// Change the default value of some uYou's options
|
// Change the default value of some uYou's options
|
||||||
if (![[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"relatedVideosAtTheEndOfYTVideos"]) {
|
if (![[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"relatedVideosAtTheEndOfYTVideos"]) {
|
||||||
@@ -1289,10 +1323,4 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
if (![[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"uYouPiPButtonVideoControlsOverlay"]) {
|
if (![[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"uYouPiPButtonVideoControlsOverlay"]) {
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"uYouPiPButtonVideoControlsOverlay"];
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"uYouPiPButtonVideoControlsOverlay"];
|
||||||
}
|
}
|
||||||
// if (![[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"uYouRepeatButtonVideoControlsOverlay"]) {
|
|
||||||
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"uYouRepeatButtonVideoControlsOverlay"];
|
|
||||||
// }
|
|
||||||
// if (![[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"uYouRightRotateButtonVideoControlsOverlay"]) {
|
|
||||||
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"uYouRightRotateButtonVideoControlsOverlay"];
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user