Updated
This commit is contained in:
parent
844da04d0a
commit
01ae33f47f
2 changed files with 104 additions and 12 deletions
|
|
@ -126,6 +126,16 @@ extern NSBundle *YTLitePlusBundle();
|
|||
# pragma mark - App Settings Overlay Options
|
||||
YTSettingsSectionItem *appSettingsOverlayGroup = [YTSettingsSectionItemClass itemWithTitle:LOC(@"App Settings Overlay Options") accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
NSArray <YTSettingsSectionItem *> *rows = @[
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_ACCOUNT_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"disableAccountSection_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableAccountSection_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_DONTEATMYCONTENT_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
|
|
@ -176,6 +186,16 @@ extern NSBundle *YTLitePlusBundle();
|
|||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_VIDEOQUALITYPREFERENCES_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"disableVideoQualityPreferencesSection_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableVideoQualityPreferencesSection_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_NOTIFICATIONS_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
|
|
@ -186,12 +206,32 @@ extern NSBundle *YTLitePlusBundle();
|
|||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_HISTORYANDPRIVACY_SECTION")
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_MANAGEALLHISTORY_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"disableHistoryAndPrivacySection_enabled")
|
||||
switchOn:IsEnabled(@"disableManageAllHistorySection_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableHistoryAndPrivacySection_enabled"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableManageAllHistorySection_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_YOURDATAINYOUTUBE_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"disableYourDataInYouTubeSection_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableYourDataInYouTubeSection_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_PRIVACY_SECTION")
|
||||
titleDescription:LOC(@"APP_RESTART_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"disablePrivacySection_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disablePrivacySection_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
|
|
|||
|
|
@ -330,21 +330,45 @@ static BOOL IsEnabled(NSString *key) {
|
|||
%end
|
||||
|
||||
// App Settings Overlay Options
|
||||
%group gDisableAccountSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateAccountSwitcherSectionWithEntry:(id)arg1 {} // Account
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gDisableDontEatMyContentSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateDEMCSectionWithEntry:(id)arg1 {} // DontEatMyContent
|
||||
- (void)updateDEMCSectionWithEntry:(id)arg1 { // DontEatMyContent
|
||||
%orig;
|
||||
NSMutableArray *sectionItems = [self valueForKey:@"_sectionItems"];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"title == %@", @"DontEatMyContent"];
|
||||
NSArray *itemsToRemove = [sectionItems filteredArrayUsingPredicate:predicate];
|
||||
[sectionItems removeObjectsInArray:itemsToRemove];
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gDisableReturnYouTubeDislikeSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateRYDSectionWithEntry:(id)arg1 {} // Return YouTube Dislike
|
||||
- (void)updateRYDSectionWithEntry:(id)arg1 { // Return YouTube Dislike
|
||||
%orig;
|
||||
NSMutableArray *sectionItems = [self valueForKey:@"_sectionItems"];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"title == %@", @"Return YouTube Dislike"];
|
||||
NSArray *itemsToRemove = [sectionItems filteredArrayUsingPredicate:predicate];
|
||||
[sectionItems removeObjectsInArray:itemsToRemove];
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gDisableYouPiPSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateYouPiPSectionWithEntry:(id)arg1 {} // YouPiP
|
||||
- (void)updateYouPiPSectionWithEntry:(id)arg1 { // YouPiP
|
||||
%orig;
|
||||
NSMutableArray *sectionItems = [self valueForKey:@"_sectionItems"];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"title == %@", @"YouPiP"];
|
||||
NSArray *itemsToRemove = [sectionItems filteredArrayUsingPredicate:predicate];
|
||||
[sectionItems removeObjectsInArray:itemsToRemove];
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
|
|
@ -356,7 +380,13 @@ static BOOL IsEnabled(NSString *key) {
|
|||
|
||||
%group gDisableTryNewFeaturesSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updatePremiumEarlyAccessSectionWithEntry:(id)arg1 {} // Try New Features
|
||||
- (void)updatePremiumEarlyAccessSectionWithEntry:(id)arg1 {} // Try new features
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gDisableVideoQualityPreferencesSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateVideoQualitySectionWithEntry:(id)arg1 {} // Video quality preferences
|
||||
%end
|
||||
%end
|
||||
|
||||
|
|
@ -366,10 +396,20 @@ static BOOL IsEnabled(NSString *key) {
|
|||
%end
|
||||
%end
|
||||
|
||||
%group gDisableHistoryAndPrivacySection
|
||||
%group gDisableManageAllHistorySection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateHistorySectionWithEntry:(id)arg1 {} // Manage all history
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gDisableYourDataInYouTubeSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateYourDataSectionWithEntry:(id)arg1 {} // Your data in YouTube
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gDisablePrivacySection
|
||||
%hook YTSettingsSectionItemManager
|
||||
- (void)updateHistoryAndPrivacySectionWithEntry:(id)arg1 {} // History And Privacy
|
||||
- (void)updateHistorySectionWithEntry:(id)arg1 {} // History
|
||||
- (void)updatePrivacySectionWithEntry:(id)arg1 {} // Privacy
|
||||
%end
|
||||
%end
|
||||
|
|
@ -464,6 +504,9 @@ static BOOL IsEnabled(NSString *key) {
|
|||
if (IsEnabled(@"stockVolumeHUD_enabled")) {
|
||||
%init(gStockVolumeHUD);
|
||||
}
|
||||
if (IsEnabled(@"disableAccountSection_enabled")) {
|
||||
%init(gDisableAccountSection);
|
||||
}
|
||||
if (IsEnabled(@"disableDontEatMyContentSection_enabled")) {
|
||||
%init(gDisableDontEatMyContentSection);
|
||||
}
|
||||
|
|
@ -479,11 +522,20 @@ static BOOL IsEnabled(NSString *key) {
|
|||
if (IsEnabled(@"disableTryNewFeaturesSection_enabled")) {
|
||||
%init(gDisableTryNewFeaturesSection);
|
||||
}
|
||||
if (IsEnabled(@"disableVideoQualityPreferencesSection_enabled")) {
|
||||
%init(gDisableVideoQualityPreferencesSection);
|
||||
}
|
||||
if (IsEnabled(@"disableNotificationsSection_enabled")) {
|
||||
%init(gDisableNotificationsSection);
|
||||
}
|
||||
if (IsEnabled(@"disableHistoryAndPrivacySection_enabled")) {
|
||||
%init(gDisableHistoryAndPrivacySection);
|
||||
if (IsEnabled(@"disableManageAllHistorySection_enabled")) {
|
||||
%init(gDisableManageAllHistorySection);
|
||||
}
|
||||
if (IsEnabled(@"disableYourDataInYouTubeSection_enabled")) {
|
||||
%init(gDisableYourDataInYouTubeSection);
|
||||
}
|
||||
if (IsEnabled(@"disablePrivacySection_enabled")) {
|
||||
%init(gDisablePrivacySection);
|
||||
}
|
||||
if (IsEnabled(@"disableLiveChatSection_enabled")) {
|
||||
%init(gDisableLiveChatSection);
|
||||
|
|
|
|||
Loading…
Reference in a new issue