From f7b8af3efe181c4f9cf36a920bbd302d9f269af3 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:47:06 -0500 Subject: [PATCH 01/23] =?UTF-8?q?Add=20=E2=80=9CApp=20Icon=E2=80=9D=20Butt?= =?UTF-8?q?on=20-=20RootOptionsController.m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/RootOptionsController.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Sources/RootOptionsController.m b/Sources/RootOptionsController.m index d62533a..436a6a8 100644 --- a/Sources/RootOptionsController.m +++ b/Sources/RootOptionsController.m @@ -1,6 +1,7 @@ #import "RootOptionsController.h" #import "ColourOptionsController.h" #import "ColourOptionsController2.h" +#import "AppIconOptionsController.h" @interface RootOptionsController () @end @@ -14,6 +15,9 @@ UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done)]; self.navigationItem.leftBarButtonItem = doneButton; + + UIBarButtonItem *appIconButton = [[UIBarButtonItem alloc] initWithTitle:@"App Icon" style:UIBarButtonItemStylePlain target:self action:@selector(showAppIconOptions)]; + self.navigationItem.rightBarButtonItem = appIconButton; UITableViewStyle style; if (@available(iOS 13, *)) { @@ -164,6 +168,19 @@ @implementation RootOptionsController (Privates) +- (void)showAppIconOptions { + if (@available(iOS 15.0, *)) { + AppIconOptionsController *appIconOptionsController = [[AppIconOptionsController alloc] init]; + UINavigationController *appIconOptionsNavController = [[UINavigationController alloc] initWithRootViewController:appIconOptionsController]; + [self presentViewController:appIconOptionsNavController animated:YES completion:nil]; + } else { + NSString *systemVersion = [[UIDevice currentDevice] systemVersion]; + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Incompatible" message:[NSString stringWithFormat:@"Changing app icons is only available on iOS 15 and later.\nYour Device is currently using iOS %@.", systemVersion] preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]]; + [self presentViewController:alert animated:YES completion:nil]; + } +} + - (void)done { [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; } From 9a1349f7ca9eb0bf49d8a98c32242ae369752291 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:47:39 -0500 Subject: [PATCH 02/23] Added App Icon Customization Menu --- Sources/AppIconOptionsController.h | 5 ++ Sources/AppIconOptionsController.m | 123 +++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 Sources/AppIconOptionsController.h create mode 100644 Sources/AppIconOptionsController.m diff --git a/Sources/AppIconOptionsController.h b/Sources/AppIconOptionsController.h new file mode 100644 index 0000000..7272db7 --- /dev/null +++ b/Sources/AppIconOptionsController.h @@ -0,0 +1,5 @@ +#import + +@interface AppIconOptionsController : UIViewController + +@end diff --git a/Sources/AppIconOptionsController.m b/Sources/AppIconOptionsController.m new file mode 100644 index 0000000..ea65b9a --- /dev/null +++ b/Sources/AppIconOptionsController.m @@ -0,0 +1,123 @@ +#import "AppIconOptionsController.h" + +@interface AppIconOptionsController () + +@property (strong, nonatomic) UICollectionView *collectionView; +@property (strong, nonatomic) UIImageView *iconPreview; +@property (strong, nonatomic) NSArray *appIcons; +@property (strong, nonatomic) NSString *selectedIconFile; + +@end + +@implementation AppIconOptionsController + +- (void)viewDidLoad { + [super viewDidLoad]; + + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + self.collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout]; + self.collectionView.dataSource = self; + self.collectionView.delegate = self; + [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"Cell"]; + [self.view addSubview:self.collectionView]; + + UIButton *defaultButton = [UIButton buttonWithType:UIButtonTypeSystem]; + defaultButton.frame = CGRectMake(20, 100, 100, 40); + [defaultButton setTitle:@"Default" forState:UIControlStateNormal]; + [defaultButton addTarget:self action:@selector(setDefaultIcon) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:defaultButton]; + + UIButton *saveButton = [UIButton buttonWithType:UIButtonTypeSystem]; + saveButton.frame = CGRectMake(150, 100, 100, 40); + [saveButton setTitle:@"Save" forState:UIControlStateNormal]; + [saveButton addTarget:self action:@selector(saveIcon) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:saveButton]; + + self.iconPreview = [[UIImageView alloc] initWithFrame:CGRectMake(20, 150, 60, 60)]; + self.iconPreview.layer.cornerRadius = 10.0; + self.iconPreview.clipsToBounds = YES; + [self.view addSubview:self.iconPreview]; + + NSString *path = [[NSBundle mainBundle] pathForResource:@"uYouPlus" ofType:@"bundle"]; + NSBundle *bundle = [NSBundle bundleWithPath:path]; + self.appIcons = [bundle pathsForResourcesOfType:@"png" inDirectory:@"AppIcons"]; + + if ([UIApplication sharedApplication].supportsAlternateIcons) { + } else { + NSLog(@"Alternate icons are not supported on this device."); + } +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.appIcons.count; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath]; + + UIImage *appIconImage = [UIImage imageWithContentsOfFile:self.appIcons[indexPath.row]]; + UIImage *resizedIconImage = [self resizedImageWithImage:appIconImage]; + + UIImageView *imageView = [[UIImageView alloc] initWithImage:resizedIconImage]; + imageView.contentMode = UIViewContentModeScaleAspectFit; + imageView.frame = cell.contentView.bounds; + imageView.layer.cornerRadius = 10.0; + imageView.clipsToBounds = YES; + [cell.contentView addSubview:imageView]; + + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + self.selectedIconFile = self.appIcons[indexPath.row]; + UIImage *selectedIconImage = [UIImage imageWithContentsOfFile:self.selectedIconFile]; + UIImage *resizedSelectedIconImage = [self resizedImageWithImage:selectedIconImage]; + self.iconPreview.image = resizedSelectedIconImage; +} + +- (void)setDefaultIcon { + self.iconPreview.image = nil; + self.selectedIconFile = nil; +} + +- (void)saveIcon { + if (self.selectedIconFile) { + [[UIApplication sharedApplication] setAlternateIconName:[self.selectedIconFile.lastPathComponent stringByDeletingPathExtension] completionHandler:^(NSError * _Nullable error){ + if (error) { + NSLog(@"Error setting alternate icon: %@", error.localizedDescription); + dispatch_async(dispatch_get_main_queue(), ^{ + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Error" message:@"Failed to set alternate icon" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; + [alert addAction:okAction]; + [self presentViewController:alert animated:YES completion:nil]; + }); + } else { + NSLog(@"Alternate icon set successfully"); + dispatch_async(dispatch_get_main_queue(), ^{ + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Success" message:@"Alternate icon set successfully" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; + [alert addAction:okAction]; + [self presentViewController:alert animated:YES completion:nil]; + }); + } + }]; + } else { + NSLog(@"No icon selected to save"); + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"No Icon Selected" message:@"Please select an icon before saving" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; + [alert addAction:okAction]; + [self presentViewController:alert animated:YES completion:nil]; + } +} + +- (UIImage *)resizedImageWithImage:(UIImage *)image { + CGFloat scale = [UIScreen mainScreen].scale; + CGSize newSize = CGSizeMake(image.size.width / scale, image.size.height / scale); + UIGraphicsBeginImageContextWithOptions(newSize, NO, scale); + [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; + UIImage *resizedImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return resizedImage; +} + +@end From 43fadd858229583562538edbecd762e366c90956 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Thu, 4 Apr 2024 21:39:53 -0500 Subject: [PATCH 03/23] Update uYouPlusSettings.xm --- Sources/uYouPlusSettings.xm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index dc08735..bee67b4 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -318,7 +318,9 @@ YTSettingsSectionItem *lowContrastMode = [YTSettingsSectionItemClass return NO; } } - [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"lowContrastMode_enabled"]; + if (IS_ENABLED(@"fixLowContrastMode_enabled")) { + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"lowContrastMode_enabled"]; + } [settingsViewController reloadData]; SHOW_RELAUNCH_YT_SNACKBAR; return YES; From 0730d732bf0ebaf5e78d7eaece11957180b1e481 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 03:20:23 +0000 Subject: [PATCH 04/23] updated submodules --- Tweaks/Return-YouTube-Dislikes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/Return-YouTube-Dislikes b/Tweaks/Return-YouTube-Dislikes index d2aec88..f5a437c 160000 --- a/Tweaks/Return-YouTube-Dislikes +++ b/Tweaks/Return-YouTube-Dislikes @@ -1 +1 @@ -Subproject commit d2aec88d3e8c300983592d4e54f55eccad12c50d +Subproject commit f5a437cbbad3da1332ad91ff89af46347a0e94e5 From 3d0c03ed10060a99be849e0c7af56cfa6d8f30f4 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 03:49:14 +0000 Subject: [PATCH 05/23] updated submodules --- Tweaks/Return-YouTube-Dislikes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/Return-YouTube-Dislikes b/Tweaks/Return-YouTube-Dislikes index f5a437c..36f63bc 160000 --- a/Tweaks/Return-YouTube-Dislikes +++ b/Tweaks/Return-YouTube-Dislikes @@ -1 +1 @@ -Subproject commit f5a437cbbad3da1332ad91ff89af46347a0e94e5 +Subproject commit 36f63bce23c84631af4b376321a661af53f3988e From 2f2c320cf30e72f287ef373ff92ce7cb29f235c7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 04:13:48 +0000 Subject: [PATCH 06/23] updated submodules --- Tweaks/Return-YouTube-Dislikes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/Return-YouTube-Dislikes b/Tweaks/Return-YouTube-Dislikes index 36f63bc..88ea49c 160000 --- a/Tweaks/Return-YouTube-Dislikes +++ b/Tweaks/Return-YouTube-Dislikes @@ -1 +1 @@ -Subproject commit 36f63bce23c84631af4b376321a661af53f3988e +Subproject commit 88ea49c577dac9a5c4756e94384928533d54ec90 From 0189d76d5086edcd74effad43bbef172ecfc7fd7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 04:22:02 +0000 Subject: [PATCH 07/23] updated submodules --- Tweaks/Return-YouTube-Dislikes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/Return-YouTube-Dislikes b/Tweaks/Return-YouTube-Dislikes index 88ea49c..4290b2f 160000 --- a/Tweaks/Return-YouTube-Dislikes +++ b/Tweaks/Return-YouTube-Dislikes @@ -1 +1 @@ -Subproject commit 88ea49c577dac9a5c4756e94384928533d54ec90 +Subproject commit 4290b2fc9302370351c4d631f9440afb4e4e76ad From cea909014b25c2b20c19f294c4091f0db4d14ede Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:56:57 -0500 Subject: [PATCH 08/23] Update update-submodules.yml --- .github/workflows/update-submodules.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index bd965c8..c2609b9 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -36,6 +36,8 @@ jobs: git add . git submodule update --init --recursive --remote Tweaks/YTABConfig git add . + git submodule update --init --recursive --remote Tweaks/YTClassicVideoQuality + git add . git submodule update --init --recursive --remote Tweaks/YTUHD git add . git submodule update --init --recursive --remote Tweaks/YTVideoOverlay From e7fcc3714a6ad37d96afce68b1570726ddd78b82 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:57:31 -0500 Subject: [PATCH 09/23] Update update-submodules-template.txt --- Sources/update-submodules-template.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/update-submodules-template.txt b/Sources/update-submodules-template.txt index 07df787..ccb8526 100644 --- a/Sources/update-submodules-template.txt +++ b/Sources/update-submodules-template.txt @@ -56,6 +56,8 @@ jobs: git add . git submodule update --init --recursive --remote Tweaks/YTABConfig git add . + git submodule update --init --recursive --remote Tweaks/YTClassicVideoQuality + git add . git submodule update --init --recursive --remote Tweaks/YTUHD git add . git submodule update --init --recursive --remote Tweaks/YTVideoOverlay From 84b65c642da88565cb4baacf3ab821ba2fa199f9 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 04:58:25 +0000 Subject: [PATCH 10/23] updated submodules --- Tweaks/YTClassicVideoQuality | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/YTClassicVideoQuality b/Tweaks/YTClassicVideoQuality index d983151..863c095 160000 --- a/Tweaks/YTClassicVideoQuality +++ b/Tweaks/YTClassicVideoQuality @@ -1 +1 @@ -Subproject commit d983151bcb0d86dc3cae17c8ffcc87661457ea5e +Subproject commit 863c0957d251f4b78552bd1ada1c6845d02e6644 From b5ce2ee8e09a2a8e7ba44ddafa68442b2e582b3f Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 6 Apr 2024 00:03:23 -0500 Subject: [PATCH 11/23] Update .gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 886192d..ab204d5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -56,7 +56,7 @@ url = https://github.com/PoomSmart/IAmYouTube.git [submodule "Tweaks/YTClassicVideoQuality"] path = Tweaks/YTClassicVideoQuality - url = https://github.com/PoomSmart/YTClassicVideoQuality.git + url = https://github.com/arichornloverALT/YTClassicVideoQuality.git [submodule "Tweaks/NoYTPremium"] path = Tweaks/NoYTPremium url = https://github.com/PoomSmart/NoYTPremium.git From 5c811a8a9c7634042fe8ca7d7e140084208b7310 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 05:04:00 +0000 Subject: [PATCH 12/23] updated submodules --- Tweaks/YTClassicVideoQuality | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/YTClassicVideoQuality b/Tweaks/YTClassicVideoQuality index 863c095..e5f3cb2 160000 --- a/Tweaks/YTClassicVideoQuality +++ b/Tweaks/YTClassicVideoQuality @@ -1 +1 @@ -Subproject commit 863c0957d251f4b78552bd1ada1c6845d02e6644 +Subproject commit e5f3cb2f3612332ae5c75ebcd7f25eb507b60750 From a2b2e13f47537add07d313e16466d28123f1ef44 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 6 Apr 2024 05:54:02 +0000 Subject: [PATCH 13/23] updated submodules --- Tweaks/YouTubeHeader | 2 +- Tweaks/iSponsorBlock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tweaks/YouTubeHeader b/Tweaks/YouTubeHeader index a2a7539..dc28206 160000 --- a/Tweaks/YouTubeHeader +++ b/Tweaks/YouTubeHeader @@ -1 +1 @@ -Subproject commit a2a753975962e51cb834ff8f86759593dac58eb4 +Subproject commit dc28206f8b11ea5c6c47b66619c8698b290cf578 diff --git a/Tweaks/iSponsorBlock b/Tweaks/iSponsorBlock index 9b6d8db..6aeaeca 160000 --- a/Tweaks/iSponsorBlock +++ b/Tweaks/iSponsorBlock @@ -1 +1 @@ -Subproject commit 9b6d8db494969546691e143aa1a1c4cbfbdcea03 +Subproject commit 6aeaeca55cd05a1b2a4a99d54e7e025647434deb From 4875974037f958403123412de4b050c4d459c3a6 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 6 Apr 2024 18:14:36 -0500 Subject: [PATCH 14/23] =?UTF-8?q?Fix=20=E2=80=9CHide=20Fullscreen=20Action?= =?UTF-8?q?s=20buttons=E2=80=9D=20Option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/uYouPlus.xm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 1b6e8c5..043b093 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -550,20 +550,25 @@ BOOL isAd(YTIElementRenderer *self) { } %end -// Hide Fullscreen Actions buttons - @bhackel +// Hide Fullscreen Actions buttons - @bhackel & @arichornlover %group hideFullscreenActions - %hook YTMainAppVideoPlayerOverlayViewController - - (BOOL)isFullscreenActionsEnabled { - // This didn't work on its own - weird - return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; +%hook YTMainAppVideoPlayerOverlayViewController +- (BOOL)isFullscreenActionsEnabled { +// This didn't work on its own - weird + return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; +} +%end +%hook YTFullscreenActionsView +- (BOOL)enabled { +// Attempt 2 + return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; +} +- (void)removeFromSuperview { + if (IS_ENABLED(@"hideFullscreenActions_enabled")) { + [super removeFromSuperview]; } - %end - %hook YTFullscreenActionsView - - (BOOL)enabled { - // Attempt 2 - return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; - } - %end +} +%end %end # pragma mark - uYouPlus From 44c56c3fdb4182c21d661e4f5b4cce102aba90f1 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 6 Apr 2024 19:44:26 -0500 Subject: [PATCH 15/23] Update uYouPlus.xm --- Sources/uYouPlus.xm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 043b093..3fe6afb 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -560,12 +560,14 @@ BOOL isAd(YTIElementRenderer *self) { %end %hook YTFullscreenActionsView - (BOOL)enabled { -// Attempt 2 - return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; + // Attempt 2 + return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; } - (void)removeFromSuperview { + %orig; + // Attempt 3 if (IS_ENABLED(@"hideFullscreenActions_enabled")) { - [super removeFromSuperview]; + [self removeFromSuperview]; } } %end From ddc0660c1eeed9b8026352e7688a937a815dee5b Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 6 Apr 2024 20:01:20 -0500 Subject: [PATCH 16/23] Added YTFullscreenActionsView header --- Sources/uYouPlus.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 13d7b6a..b25407e 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -44,7 +44,7 @@ #define YT_BUNDLE_ID @"com.google.ios.youtube" #define YT_NAME @"YouTube" #define DEFAULT_RATE 1.0f // YTSpeed -#define LOWCONTRASTMODE_CUTOFF_VERSION @"17.38.10" // LowContrastMode +#define LOWCONTRASTMODE_CUTOFF_VERSION @"17.38.10" // LowContrastMode (v17.33.2-17.38.10) // IAmYouTube @interface SSOConfiguration : NSObject @@ -87,6 +87,9 @@ @interface YTTransportControlsButtonView : UIView @end +@interface YTFullscreenActionsView : UIView +@end + @interface _ASCollectionViewCell : UICollectionViewCell - (id)node; @end From 293f3e2f9816bed484b169950d08fea2b6e795b2 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:57:22 -0500 Subject: [PATCH 17/23] Update uYouPlus.xm --- Sources/uYouPlus.xm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 3fe6afb..8ed236b 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -564,11 +564,11 @@ BOOL isAd(YTIElementRenderer *self) { return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig; } - (void)removeFromSuperview { - %orig; // Attempt 3 if (IS_ENABLED(@"hideFullscreenActions_enabled")) { [self removeFromSuperview]; } +%orig; } %end %end From 9af049cd6510fef65097ae22f98f4fbdf4a665e2 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:07:41 -0500 Subject: [PATCH 18/23] Update uYouPlus.xm --- Sources/uYouPlus.xm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 8ed236b..b2eba39 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -786,15 +786,28 @@ BOOL isAd(YTIElementRenderer *self) { // Bring back the Red Progress Bar and Gray Buffer Progress %group gRedProgressBar -%hook YTInlinePlayerBarContainerView +%hook YTSegmentableInlinePlayerBarView +- (void)setBufferedProgressBarColor:(id)arg1 { + [UIColor colorWithRed:1.00 green:1.00 blue:1.00 alpha:0.50]; +} +%end + +%hook YTInlinePlayerBarContainerView // Red Progress Bar - Old (Compatible for v17.33.2-v19.10.7) - (id)quietProgressBarColor { return [UIColor redColor]; } %end -%hook YTSegmentableInlinePlayerBarView -- (void)setBufferedProgressBarColor:(id)arg1 { - [UIColor colorWithRed:1.00 green:1.00 blue:1.00 alpha:0.50]; +%hook YTPlayerBarRectangleDecorationView // Red Progress Bar - New (Compatible for v19.10.7-latest) +- (void)drawRectangleDecorationWithSideMasks:(CGRect)rect { + if (IS_ENABLED(@"redProgressBar_enabled")) { + YTIPlayerBarDecorationModel *model = [self valueForKey:@"_model"]; + int overlayMode = model.playingState.overlayMode; + model.playingState.overlayMode = 1; + %orig; + model.playingState.overlayMode = overlayMode; + } else + %orig; } %end %end From a9aa45786e990b6fae7ecf1070579cc8a7d0476f Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:16:59 -0500 Subject: [PATCH 19/23] Update uYouPlus.h --- Sources/uYouPlus.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index b25407e..1c8d291 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -8,9 +8,11 @@ #import #import -#import "uYouPlusThemes.h" -#import "Tweaks/YouTubeHeader/YTAppDelegate.h" +#import "uYouPlusThemes.h" // Hide "Buy Super Thanks" banner (_ASDisplayView) +#import "Tweaks/YouTubeHeader/YTAppDelegate.h" // Activate FLEX #import "Tweaks/YouTubeHeader/YTIMenuConditionalServiceItemRenderer.h" +#import +#import #import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h" #import "Tweaks/YouTubeHeader/YTIGuideResponse.h" #import "Tweaks/YouTubeHeader/YTIGuideResponseSupportedRenderers.h" From ec19ed861d1e0181dc396809e87ae239462894b3 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 7 Apr 2024 20:09:07 -0500 Subject: [PATCH 20/23] Update uYouPlus.h --- Sources/uYouPlus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 1c8d291..e5b89d2 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -11,8 +11,8 @@ #import "uYouPlusThemes.h" // Hide "Buy Super Thanks" banner (_ASDisplayView) #import "Tweaks/YouTubeHeader/YTAppDelegate.h" // Activate FLEX #import "Tweaks/YouTubeHeader/YTIMenuConditionalServiceItemRenderer.h" -#import -#import +#import "Tweaks/YouTubeHeader/YTIPlayerBarDecorationModel.h" +#import "Tweaks/YouTubeHeader/YTPlayerBarRectangleDecorationView.h" #import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h" #import "Tweaks/YouTubeHeader/YTIGuideResponse.h" #import "Tweaks/YouTubeHeader/YTIGuideResponseSupportedRenderers.h" From b7771054e27e4974253808e79fe7bdba4e432f55 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 8 Apr 2024 02:57:40 +0000 Subject: [PATCH 21/23] updated submodules --- Tweaks/iSponsorBlock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/iSponsorBlock b/Tweaks/iSponsorBlock index 6aeaeca..304ec97 160000 --- a/Tweaks/iSponsorBlock +++ b/Tweaks/iSponsorBlock @@ -1 +1 @@ -Subproject commit 6aeaeca55cd05a1b2a4a99d54e7e025647434deb +Subproject commit 304ec97e4cc9060a80f9128b713243c92a3215d9 From 305810219971d1540e09cb9875de61a51afe480b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 8 Apr 2024 03:04:15 +0000 Subject: [PATCH 22/23] updated submodules --- Tweaks/YouTubeHeader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/YouTubeHeader b/Tweaks/YouTubeHeader index dc28206..591fe9d 160000 --- a/Tweaks/YouTubeHeader +++ b/Tweaks/YouTubeHeader @@ -1 +1 @@ -Subproject commit dc28206f8b11ea5c6c47b66619c8698b290cf578 +Subproject commit 591fe9dc1dcfbd4591b391fe5b25301beea5e5b7 From 414db83cf5836010bbbed5720a4f8f3704080744 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 8 Apr 2024 04:44:34 +0000 Subject: [PATCH 23/23] updated submodules --- Tweaks/Return-YouTube-Dislikes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tweaks/Return-YouTube-Dislikes b/Tweaks/Return-YouTube-Dislikes index 4290b2f..8d90af3 160000 --- a/Tweaks/Return-YouTube-Dislikes +++ b/Tweaks/Return-YouTube-Dislikes @@ -1 +1 @@ -Subproject commit 4290b2fc9302370351c4d631f9440afb4e4e76ad +Subproject commit 8d90af33a8ace8f1e0adbaa863aed5da9a835fc4