for TrollStore user only: add an option to fix Google Sign in
This commit is contained in:
+10
-1
@@ -51,6 +51,15 @@ extern BOOL hidePaidPromotionCard();
|
|||||||
exit(0);
|
exit(0);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
YTSettingsSectionItem *fixGoogleSigin = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"FIX_GOOGLE_SIGNIN") titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC")];
|
||||||
|
fixGoogleSigin.hasSwitch = YES;
|
||||||
|
fixGoogleSigin.switchVisible = YES;
|
||||||
|
fixGoogleSigin.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"fixGoogleSigin_enabled"];
|
||||||
|
fixGoogleSigin.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"fixGoogleSigin_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
|
||||||
YTSettingsSectionItem *hidePaidPromotionCard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PAID_PROMOTION_CARDS") titleDescription:LOC(@"HIDE_PAID_PROMOTION_CARDS_DESC")];
|
YTSettingsSectionItem *hidePaidPromotionCard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PAID_PROMOTION_CARDS") titleDescription:LOC(@"HIDE_PAID_PROMOTION_CARDS_DESC")];
|
||||||
hidePaidPromotionCard.hasSwitch = YES;
|
hidePaidPromotionCard.hasSwitch = YES;
|
||||||
hidePaidPromotionCard.switchVisible = YES;
|
hidePaidPromotionCard.switchVisible = YES;
|
||||||
@@ -168,7 +177,7 @@ extern BOOL hidePaidPromotionCard();
|
|||||||
return YES;
|
return YES;
|
||||||
};
|
};
|
||||||
|
|
||||||
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[killApp, autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hidePaidPromotionCard, hidePreviousAndNextButton, hideHoverCard, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, reExplore]];
|
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[killApp, autoFull, castConfirm, ytMiniPlayer, fixGoogleSigin, hideAutoplaySwitch, hideCC, hideHUD, hidePaidPromotionCard, hidePreviousAndNextButton, hideHoverCard, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, reExplore]];
|
||||||
[delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO];
|
[delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+16
-8
@@ -90,6 +90,9 @@ BOOL ytMiniPlayer() {
|
|||||||
BOOL hidePaidPromotionCard() {
|
BOOL hidePaidPromotionCard() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePaidPromotionCard_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePaidPromotionCard_enabled"];
|
||||||
}
|
}
|
||||||
|
BOOL fixGoogleSigin() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"fixGoogleSigin_enabled"];
|
||||||
|
}
|
||||||
|
|
||||||
# pragma mark - Tweaks
|
# pragma mark - Tweaks
|
||||||
// Enable Reorder videos from playlist while on the Watch page - @PoomSmart
|
// Enable Reorder videos from playlist while on the Watch page - @PoomSmart
|
||||||
@@ -430,6 +433,14 @@ BOOL hidePaidPromotionCard() {
|
|||||||
- (NSString *)bundleId { return YT_BUNDLE_ID; }
|
- (NSString *)bundleId { return YT_BUNDLE_ID; }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook APMAEU
|
||||||
|
+ (BOOL)isFAS { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook GULAppEnvironmentUtil
|
||||||
|
+ (BOOL)isFromAppStore { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
%hook SSOConfiguration
|
%hook SSOConfiguration
|
||||||
- (id)initWithClientID:(id)clientID supportedAccountServices:(id)supportedAccountServices {
|
- (id)initWithClientID:(id)clientID supportedAccountServices:(id)supportedAccountServices {
|
||||||
self = %orig;
|
self = %orig;
|
||||||
@@ -439,14 +450,6 @@ BOOL hidePaidPromotionCard() {
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook APMAEU
|
|
||||||
+ (BOOL)isFAS { return YES; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook GULAppEnvironmentUtil
|
|
||||||
+ (BOOL)isFromAppStore { return YES; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook NSBundle
|
%hook NSBundle
|
||||||
- (NSString *)bundleIdentifier {
|
- (NSString *)bundleIdentifier {
|
||||||
NSArray *address = [NSThread callStackReturnAddresses];
|
NSArray *address = [NSThread callStackReturnAddresses];
|
||||||
@@ -470,6 +473,7 @@ BOOL hidePaidPromotionCard() {
|
|||||||
// Fix "You can't sign in to this app because Google can't confirm that it's safe" warning when signing in. by julioverne & PoomSmart
|
// Fix "You can't sign in to this app because Google can't confirm that it's safe" warning when signing in. by julioverne & PoomSmart
|
||||||
// https://gist.github.com/PoomSmart/ef5b172fd4c5371764e027bea2613f93
|
// https://gist.github.com/PoomSmart/ef5b172fd4c5371764e027bea2613f93
|
||||||
// https://github.com/qnblackcat/uYouPlus/pull/398
|
// https://github.com/qnblackcat/uYouPlus/pull/398
|
||||||
|
%group gDevice_challenge_request_hack
|
||||||
%hook SSOService
|
%hook SSOService
|
||||||
+ (id)fetcherWithRequest:(NSMutableURLRequest *)request configuration:(id)configuration {
|
+ (id)fetcherWithRequest:(NSMutableURLRequest *)request configuration:(id)configuration {
|
||||||
if ([request isKindOfClass:[NSMutableURLRequest class]] && request.HTTPBody) {
|
if ([request isKindOfClass:[NSMutableURLRequest class]] && request.HTTPBody) {
|
||||||
@@ -483,6 +487,7 @@ BOOL hidePaidPromotionCard() {
|
|||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
// Fix login for YouTube 17.33.2 and higher
|
// Fix login for YouTube 17.33.2 and higher
|
||||||
%hook SSOKeychainCore
|
%hook SSOKeychainCore
|
||||||
@@ -872,4 +877,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||||||
if (@available(iOS 16, *)) {
|
if (@available(iOS 16, *)) {
|
||||||
%init(iOS16);
|
%init(iOS16);
|
||||||
}
|
}
|
||||||
|
if (!fixGoogleSigin()) {
|
||||||
|
%init(gDevice_challenge_request_hack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user