Merge branch 'main' into feature/fake-premium
2
.github/workflows/buildapp.yml
vendored
|
|
@ -54,7 +54,7 @@ concurrency:
|
|||
jobs:
|
||||
build:
|
||||
name: Build uYouEnhanced
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-12
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
|
|
|
|||
4
.github/workflows/update-submodules.yml
vendored
|
|
@ -22,14 +22,14 @@ jobs:
|
|||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/DontEatMyContent
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/IAmYouTube
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/YTHoldForSpeed
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/YTSpeed
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/MrBeastify
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/PSHeader
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/Return-YouTube-Dislikes
|
||||
git add .
|
||||
git submodule update --init --recursive --remote Tweaks/uYouLocalization
|
||||
|
|
|
|||
2
.gitmodules
vendored
|
|
@ -32,7 +32,7 @@
|
|||
branch = main
|
||||
[submodule "Tweaks/YTABConfig"]
|
||||
path = Tweaks/YTABConfig
|
||||
url = https://github.com/arichornlover/YTABConfig.git
|
||||
url = https://github.com/arichornlover/YTABConfig2.git
|
||||
branch = main
|
||||
[submodule "Tweaks/Alderis"]
|
||||
path = Tweaks/Alderis
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ The following versions of the uYouEnhanced Tweak are currently supported with se
|
|||
| Developer(s) | Version | LTS Support | YT Version Supported | App Stability | uYou Functionality |
|
||||
| ----------- | ------- | ----------- | -------------------- | ------------- | ------------------ |
|
||||
| MiRO92(uYou) & arichornlover(uYouEnhanced) | [latest](https://github.com/arichornlover/uYouEnhanced/releases/latest) | ✅ | ✅ | Stable | Fully functional |
|
||||
| MiRO92(uYou) & bhackel(uYouEnhanced-LTS) | [19.06.2-3.0.3 LTS](https://github.com/bhackel/uYouEnhanced/releases/tag/v19.06.2-3.0.3-(98)) | ✅ | ✅ | Stable, only provides version 19.06.2 of YouTube and uYou 3.0.3 | Crashes the app if the video is in fullscreen on an iPad, which would only happen if you installed the .ipa using a different sideloading/jailbreak tool. |
|
||||
| MiRO92(uYou) & bhackel(uYouEnhanced-LTS) | [19.06.2-3.0.3 LTS](https://github.com/bhackel/uYouEnhanced/releases/tag/v19.06.2-3.0.3-(185)) | ✅ | ✅ | Stable, only provides version 19.06.2 of YouTube and uYou 3.0.3 | Crashes the app if the video is in fullscreen on an iPad, which would only happen if you installed the .ipa using a different sideloading/jailbreak tool. |
|
||||
| MiRO92(uYou) & arichornlover(uYouEnhanced-LTS)| [16.42.3-2.1 LTS](https://github.com/arichornlover/uYouEnhanced/tree/main-16.42.3LTS) | Discontinued | ❌ | iOS 16+ compatibility issues, some features may not work properly. App will not work anymore, affecting versions v16.05.7-v17.32.2 as well. 💔 | uYou Video/Audio Downloading is offline (except uYouLocal). |
|
||||
|
|
|
|||
BIN
Localizations/uYouPlus.bundle/AppIcons/2007.png
Normal file
|
After Width: | Height: | Size: 203 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/2012.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/2012_blue.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/2013.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 28 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/Black.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/Oreo.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/Outline.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/White.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/YTLitePlus.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/uYou.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
Localizations/uYouPlus.bundle/AppIcons/uYouPlus.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
Localizations/uYouPlus.bundle/Back.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
|
@ -2,23 +2,113 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>YouTubeTweak</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.qn.uyouplus</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>uYouPlus</string>
|
||||
</dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>YouTubeTweak</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.qn.uyouplus</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>uYouPlus</string>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>AppIcon</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>CFBundleAlternateIcons</key>
|
||||
<dict>
|
||||
<key>White</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>White</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>YTLitePlus</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>YTLitePlus</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Outline</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Outline</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>2012</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>2012</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>2013</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>2013</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>2007</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>2007</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Black</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Black</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Oreo</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Oreo</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uYou</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>uYou</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>2012_blue</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>2012_blue</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uYouPlus</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>uYouPlus</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 527 B |
2
Makefile
|
|
@ -14,7 +14,7 @@ MODULES = jailed
|
|||
endif
|
||||
|
||||
ifndef YOUTUBE_VERSION
|
||||
YOUTUBE_VERSION = 19.13.1
|
||||
YOUTUBE_VERSION = 19.14.3
|
||||
endif
|
||||
ifndef UYOU_VERSION
|
||||
UYOU_VERSION = 3.0.3
|
||||
|
|
|
|||
|
|
@ -280,17 +280,17 @@
|
|||
|
||||
- My official AltStore repo: https://therealfoxster.github.io/altsource-viewer/view/?source=https://raw.githubusercontent.com/arichornlover/arichornlover.github.io/main/apps.json
|
||||
|
||||
- [Open in AltStore (v19.10.7-3.0.3)](https://tinyurl.com/2s4zrj2h) - It will take a while to install because AltStore needs to download the IPA first.
|
||||
- [Open in AltStore (v19.14.2-3.0.3)](https://tinyurl.com/2mc82ksf) - It will take a while to install because AltStore needs to download the IPA first.
|
||||
|
||||
<details>
|
||||
<summary>Version information (last updated: Apr 4, 2024)</summary>
|
||||
<summary>Version information (last updated: Apr 10, 2024)</summary>
|
||||
|
||||
| **Tweaks/App** | **Developer** | **Version** | **Open source** |
|
||||
| - | - | :-: | :-: |
|
||||
| **YouTube** | Google Inc | 19.13.1 | ✖︎ |
|
||||
| **YouTube** | Google Inc | 19.14.2 | ✖︎ |
|
||||
| [uYou](https://github.com/MiRO92/uYou-for-YouTube) | [MiRO92](https://twitter.com/miro92) | 3.0.3 | ✖︎ |
|
||||
| **Open in YouTube** | [CokePokes](https://github.com/CokePokes) | 1.2 | [✔︎](https://github.com/CokePokes/YoutubeExtensions) |
|
||||
| **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.2.2 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
||||
| **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.2.4 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
||||
| **BigYTMiniPlayer** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
|
||||
| **YTNoHoverCards** | [level3tjg](https://twitter.com/level3tjg) | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) |
|
||||
| **YTMiniplayerEnabler** | [level3tjg](https://twitter.com/level3tjg) | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) |
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
#import "AppIconOptionsController.h"
|
||||
|
||||
@interface AppIconOptionsController () <UICollectionViewDataSource, UICollectionViewDelegate>
|
||||
@interface AppIconOptionsController () <UITableViewDataSource, UITableViewDelegate>
|
||||
|
||||
@property (strong, nonatomic) UICollectionView *collectionView;
|
||||
@property (strong, nonatomic) UIImageView *iconPreview;
|
||||
@property (strong, nonatomic) UITableView *tableView;
|
||||
@property (strong, nonatomic) NSArray<NSString *> *appIcons;
|
||||
@property (strong, nonatomic) NSString *selectedIconFile;
|
||||
@property (assign, nonatomic) NSInteger selectedIconIndex;
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -14,110 +13,135 @@
|
|||
- (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];
|
||||
self.title = @"Change App Icon";
|
||||
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont fontWithName:@"YTSans-Bold" size:22], NSForegroundColorAttributeName: [UIColor whiteColor]}];
|
||||
|
||||
self.selectedIconIndex = -1;
|
||||
|
||||
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.");
|
||||
}
|
||||
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Back.png" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil] style:UIBarButtonItemStylePlain target:self action:@selector(back)];
|
||||
self.navigationItem.leftBarButtonItem = backButton;
|
||||
|
||||
self.appIcons = [self loadAppIcons];
|
||||
[self setupNavigationBar];
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
- (NSArray<NSString *> *)loadAppIcons {
|
||||
NSString *path = [[NSBundle mainBundle] pathForResource:@"uYouPlus" ofType:@"bundle"];
|
||||
NSBundle *bundle = [NSBundle bundleWithPath:path];
|
||||
return [bundle pathsForResourcesOfType:@"png" inDirectory:@"AppIcons"];
|
||||
}
|
||||
|
||||
- (void)setupNavigationBar {
|
||||
UIBarButtonItem *resetButton = [[UIBarButtonItem alloc] initWithImage:[UIImage systemImageNamed:@"arrow.clockwise.circle.fill"] style:UIBarButtonItemStylePlain target:self action:@selector(resetIcon)];
|
||||
|
||||
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(saveIcon)];
|
||||
[self.navigationItem setRightBarButtonItems:@[saveButton, resetButton]];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.appIcons.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
|
||||
if (!cell) {
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
|
||||
}
|
||||
|
||||
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];
|
||||
[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
||||
|
||||
NSString *iconPath = self.appIcons[indexPath.row];
|
||||
UIImage *iconImage = [UIImage imageWithContentsOfFile:iconPath];
|
||||
|
||||
UIImageView *iconImageView = [[UIImageView alloc] initWithImage:iconImage];
|
||||
iconImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
iconImageView.frame = CGRectMake(16, 10, 60, 60);
|
||||
iconImageView.layer.cornerRadius = 8;
|
||||
iconImageView.layer.masksToBounds = YES;
|
||||
[cell.contentView addSubview:iconImageView];
|
||||
|
||||
UILabel *iconNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(90, 10, self.view.frame.size.width - 90, 60)];
|
||||
iconNameLabel.text = [iconPath.lastPathComponent stringByDeletingPathExtension];
|
||||
iconNameLabel.textColor = [UIColor blackColor];
|
||||
iconNameLabel.font = [UIFont systemFontOfSize:16.0 weight:UIFontWeightMedium];
|
||||
[cell.contentView addSubview:iconNameLabel];
|
||||
|
||||
cell.accessoryType = (indexPath.row == self.selectedIconIndex) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
||||
|
||||
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)resetIcon {
|
||||
[[UIApplication sharedApplication] setAlternateIconName:nil completionHandler:^(NSError * _Nullable error) {
|
||||
if (error) {
|
||||
NSLog(@"Error resetting icon: %@", error.localizedDescription);
|
||||
[self showAlertWithTitle:@"Error" message:@"Failed to reset icon"];
|
||||
} else {
|
||||
NSLog(@"Icon reset successfully");
|
||||
[self showAlertWithTitle:@"Success" message:@"Icon reset successfully"];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (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];
|
||||
});
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
NSString *selectedIcon = self.selectedIconIndex >= 0 ? self.appIcons[self.selectedIconIndex] : nil;
|
||||
if (selectedIcon) {
|
||||
NSString *iconName = [selectedIcon.lastPathComponent stringByDeletingPathExtension];
|
||||
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Info" ofType:@"plist"];
|
||||
NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithContentsOfFile:plistPath];
|
||||
NSMutableDictionary *iconsDict = [infoDict objectForKey:@"CFBundleIcons"];
|
||||
|
||||
if (iconsDict) {
|
||||
NSMutableDictionary *primaryIconDict = [iconsDict objectForKey:@"CFBundlePrimaryIcon"];
|
||||
if (primaryIconDict) {
|
||||
NSMutableArray *iconFiles = [primaryIconDict objectForKey:@"CFBundleIconFiles"];
|
||||
[iconFiles addObject:iconName];
|
||||
primaryIconDict[@"CFBundleIconFiles"] = iconFiles;
|
||||
}
|
||||
[infoDict setObject:iconsDict forKey:@"CFBundleIcons"];
|
||||
[infoDict writeToFile:plistPath atomically:YES];
|
||||
|
||||
[[UIApplication sharedApplication] setAlternateIconName:iconName completionHandler:^(NSError * _Nullable error) {
|
||||
if (error) {
|
||||
NSLog(@"Error setting alternate icon: %@", error.localizedDescription);
|
||||
[self showAlertWithTitle:@"Error" message:@"Failed to set alternate icon"];
|
||||
} else {
|
||||
NSLog(@"Alternate icon set successfully");
|
||||
[self showAlertWithTitle:@"Success" message:@"Alternate icon set successfully"];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.tableView reloadData];
|
||||
});
|
||||
}
|
||||
}];
|
||||
} 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];
|
||||
});
|
||||
NSLog(@"CFBundleIcons key not found in Info.plist");
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
NSLog(@"No icon selected to save");
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"No Icon Selected" message:@"Please select an icon before saving" preferredStyle:UIAlertControllerStyleAlert];
|
||||
} else {
|
||||
NSLog(@"Selected icon path is nil");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message 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;
|
||||
- (void)back {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
@implementation ColourOptionsController
|
||||
|
||||
- (void)loadView {
|
||||
[super loadView];
|
||||
[super loadView];
|
||||
|
||||
self.title = @"Custom Theme Color";
|
||||
|
||||
self.title = @"Theme Custom Color";
|
||||
|
||||
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(close)];
|
||||
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(save)];
|
||||
self.navigationItem.rightBarButtonItems = @[closeButton, saveButton];
|
||||
|
|
@ -24,10 +24,19 @@
|
|||
[unarchiver setRequiresSecureCoding:NO];
|
||||
UIColor *color = [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
|
||||
self.selectedColor = color;
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) {
|
||||
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
||||
CGFloat screenWidth = screenRect.size.width;
|
||||
if (screenWidth == 1024 || screenWidth == 1112) {
|
||||
self.view.transform = CGAffineTransformMakeScale(0.7, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||
[super traitCollectionDidChange:previousTraitCollection];
|
||||
[self loadView];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,10 +24,19 @@
|
|||
[lcmUnarchiver setRequiresSecureCoding:NO];
|
||||
UIColor *color = [lcmUnarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
|
||||
self.selectedColor = color;
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) {
|
||||
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
||||
CGFloat screenWidth = screenRect.size.width;
|
||||
if (screenWidth == 1024 || screenWidth == 1112) {
|
||||
self.view.transform = CGAffineTransformMakeScale(0.7, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||
[super traitCollectionDidChange:previousTraitCollection];
|
||||
[self loadView];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
#import "RootOptionsController.h"
|
||||
#import "ColourOptionsController.h"
|
||||
#import "ColourOptionsController2.h"
|
||||
#import "AppIconOptionsController.h"
|
||||
|
||||
@interface RootOptionsController ()
|
||||
|
||||
@property (strong, nonatomic) UIImageView *backButton;
|
||||
@property (assign, nonatomic) UIUserInterfaceStyle pageStyle;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RootOptionsController
|
||||
|
|
@ -11,13 +14,12 @@
|
|||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
self.title = @"uYouPlus Extras Menu";
|
||||
self.title = @"uYouEnhanced Extras Menu";
|
||||
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont fontWithName:@"YTSans-Bold" size:22], NSForegroundColorAttributeName: [UIColor whiteColor]}];
|
||||
|
||||
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;
|
||||
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Back.png" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil] style:UIBarButtonItemStylePlain target:self action:@selector(back)];
|
||||
[backButton setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor blackColor], NSFontAttributeName: [UIFont fontWithName:@"YTSans-Medium" size:20]} forState:UIControlStateNormal];
|
||||
self.navigationItem.leftBarButtonItem = backButton;
|
||||
|
||||
UITableViewStyle style;
|
||||
if (@available(iOS 13, *)) {
|
||||
|
|
@ -168,21 +170,8 @@
|
|||
|
||||
@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];
|
||||
- (void)back {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#import <YouTubeHeader/YTIFormattedString.h>
|
||||
#import <YouTubeHeader/GPBMessage.h>
|
||||
#import <YouTubeHeader/YTIStringRun.h>
|
||||
#import <YouTubeHeader/YTWatchViewController.h>
|
||||
|
||||
// Hide buttons under the video player by @PoomSmart
|
||||
#import <YouTubeHeader/ASCollectionElement.h>
|
||||
|
|
@ -108,6 +109,15 @@
|
|||
@property(readonly, nonatomic) YTISectionListRenderer *model;
|
||||
@end
|
||||
|
||||
// Disable Pull to Full for landscape videos - @bhackel
|
||||
@interface YTWatchPullToFullController : NSObject
|
||||
@property(nonatomic, strong) YTWatchViewController *playerViewSource;
|
||||
@end
|
||||
@interface YTWatchViewController (uYouEnhanced)
|
||||
@property(nonatomic, strong) YTWatchPullToFullController *pullToFullController;
|
||||
- (NSUInteger)allowedFullScreenOrientations;
|
||||
@end
|
||||
|
||||
// uYouPlus
|
||||
@interface YTHeaderLogoController : UIView
|
||||
@property(readonly, nonatomic) long long pageStyle;
|
||||
|
|
@ -119,6 +129,9 @@
|
|||
@interface YTChipCloudCell : UIView
|
||||
@end
|
||||
|
||||
@interface YTCountView : UIView
|
||||
@end
|
||||
|
||||
@interface YTPlayabilityResolutionUserActionUIController : NSObject // Skips content warning before playing *some videos - @PoomSmart
|
||||
- (void)confirmAlertDidPressConfirm;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ static int contrastMode() {
|
|||
}
|
||||
//
|
||||
|
||||
# pragma mark - Tweaks
|
||||
# pragma mark - Other hooks
|
||||
|
||||
// Activate FLEX
|
||||
%hook YTAppDelegate
|
||||
|
|
@ -52,6 +52,33 @@ static int contrastMode() {
|
|||
}
|
||||
%end
|
||||
|
||||
// Fixes uYou crash when trying to play video (#1422)
|
||||
@interface YTVarispeedSwitchController : NSObject
|
||||
@end
|
||||
|
||||
@interface YTPlayerOverlayManager : NSObject
|
||||
@property (nonatomic, assign) float currentPlaybackRate;
|
||||
@property (nonatomic, strong, readonly) YTVarispeedSwitchController *varispeedController;
|
||||
|
||||
- (void)varispeedSwitchController:(YTVarispeedSwitchController *)varispeed didSelectRate:(float)rate;
|
||||
- (void)setCurrentPlaybackRate:(float)rate;
|
||||
- (void)setPlaybackRate:(float)rate;
|
||||
@end
|
||||
|
||||
%hook YTPlayerOverlayManager
|
||||
%property (nonatomic, assign) float currentPlaybackRate;
|
||||
|
||||
%new
|
||||
- (void)setCurrentPlaybackRate:(float)rate {
|
||||
[self varispeedSwitchController:self.varispeedController didSelectRate:rate];
|
||||
}
|
||||
|
||||
%new
|
||||
- (void)setPlaybackRate:(float)rate {
|
||||
[self varispeedSwitchController:self.varispeedController didSelectRate:rate];
|
||||
}
|
||||
%end
|
||||
|
||||
// Enable Alternate Icons
|
||||
%hook UIApplication
|
||||
- (BOOL)supportsAlternateIcons {
|
||||
|
|
@ -622,6 +649,17 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
%end
|
||||
%end
|
||||
|
||||
// Fix uYou Repeat - @bhackel
|
||||
// When uYou repeat is enabled, and Suggested Video Popup is disabled,
|
||||
// the endscreen view with multiple suggestions is overlayed when it
|
||||
// should not be.
|
||||
%hook YTFullscreenEngagementOverlayController
|
||||
- (BOOL)isEnabled {
|
||||
// repeatVideo is the key for uYou Repeat
|
||||
return IS_ENABLED(@"repeatVideo") ? NO : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
# pragma mark - Hide Notification Button && SponsorBlock Button && uYouPlus Button
|
||||
%hook YTRightNavigationButtons
|
||||
- (void)layoutSubviews {
|
||||
|
|
@ -633,10 +671,6 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
self.sponsorBlockButton.hidden = YES;
|
||||
self.sponsorBlockButton.frame = CGRectZero;
|
||||
}
|
||||
if (IS_ENABLED(@"hideuYouPlusButton_enabled")) {
|
||||
self.uYouPlusButton.hidden = YES;
|
||||
self.uYouPlusButton.frame = CGRectZero;
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
|
|
@ -644,21 +678,21 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
%group hideFullscreenActions
|
||||
%hook YTMainAppVideoPlayerOverlayViewController
|
||||
- (BOOL)isFullscreenActionsEnabled {
|
||||
// This didn't work on its own - weird
|
||||
return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig;
|
||||
return NO;
|
||||
}
|
||||
%end
|
||||
%hook YTFullscreenActionsView
|
||||
- (BOOL)enabled {
|
||||
// Attempt 2
|
||||
return IS_ENABLED(@"hideFullscreenActions_enabled") ? NO : %orig;
|
||||
return NO;
|
||||
}
|
||||
- (void)removeFromSuperview {
|
||||
// Attempt 3
|
||||
if (IS_ENABLED(@"hideFullscreenActions_enabled")) {
|
||||
- (void)layoutSubviews {
|
||||
// Check if already removed from superview
|
||||
if (self.superview) {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
%orig;
|
||||
self.hidden = YES;
|
||||
self.frame = CGRectZero;
|
||||
%orig;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
|
@ -731,11 +765,32 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
if (IS_ENABLED(@"hideDoubleTapToSeekOverlay_enabled")) {
|
||||
self.scrimOverlay.backgroundColor = [UIColor clearColor];
|
||||
self.frame = CGRectZero;
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
// Disable pull to enter vertical/portrait fullscreen gesture - @bhackel
|
||||
// This was introduced in version 19.XX
|
||||
// This only applies to landscape videos
|
||||
%group gDisablePullToFull
|
||||
%hook YTWatchPullToFullController
|
||||
- (BOOL)shouldRecognizeOverscrollEventsFromWatchOverscrollController:(id)arg1 {
|
||||
// Get the current player orientation
|
||||
YTWatchViewController *watchViewController = self.playerViewSource;
|
||||
NSUInteger allowedFullScreenOrientations = [watchViewController allowedFullScreenOrientations];
|
||||
// Check if the current player orientation is portrait
|
||||
if (allowedFullScreenOrientations == UIInterfaceOrientationMaskAllButUpsideDown
|
||||
|| allowedFullScreenOrientations == UIInterfaceOrientationMaskPortrait
|
||||
|| allowedFullScreenOrientations == UIInterfaceOrientationMaskPortraitUpsideDown) {
|
||||
return %orig;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// Video Controls Overlay Options
|
||||
// Hide CC / Hide Autoplay switch / Hide YTMusic Button / Enable Share Button / Enable Save to Playlist Button
|
||||
%hook YTMainAppControlsOverlayView
|
||||
|
|
@ -843,7 +898,14 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
// %end
|
||||
// %end
|
||||
|
||||
// Hide Dark Overlay Background
|
||||
// Hide Video Title (in Fullscreen) - @arichornlover
|
||||
%hook YTMainAppVideoPlayerOverlayView
|
||||
- (BOOL)titleViewHidden {
|
||||
return IS_ENABLED(@"hideVideoTitle_enabled") ? YES : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide Dark Overlay Background - @Dayanch96
|
||||
%group gHideOverlayDarkBackground
|
||||
%hook YTMainAppVideoPlayerOverlayView
|
||||
- (void)setBackgroundVisible:(BOOL)arg1 isGradientBackground:(BOOL)arg2 {
|
||||
|
|
@ -1011,63 +1073,6 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
}
|
||||
%end
|
||||
|
||||
// uYouPlus Button in Navigation Bar (for Clear Cache and Color Options) - @arichornlover
|
||||
%hook YTRightNavigationButtons
|
||||
%property (retain, nonatomic) YTQTMButton *uYouPlusButton;
|
||||
- (NSMutableArray *)buttons {
|
||||
NSString *tweakBundlePath = [[NSBundle mainBundle] pathForResource:@"uYouPlus" ofType:@"bundle"];
|
||||
NSString *uYouPlusMainSettingsPath;
|
||||
if (tweakBundlePath) {
|
||||
NSBundle *tweakBundle = [NSBundle bundleWithPath:tweakBundlePath];
|
||||
uYouPlusMainSettingsPath = [tweakBundle pathForResource:@"uYouPlus_logo_main" ofType:@"png"];
|
||||
} else {
|
||||
uYouPlusMainSettingsPath = ROOT_PATH_NS(@"/Localizations/uYouPlus.bundle/uYouPlus_logo_main.png");
|
||||
}
|
||||
NSMutableArray *retVal = %orig.mutableCopy;
|
||||
[self.uYouPlusButton removeFromSuperview];
|
||||
[self addSubview:self.uYouPlusButton];
|
||||
if (!self.uYouPlusButton) {
|
||||
self.uYouPlusButton = [%c(YTQTMButton) iconButton];
|
||||
[self.uYouPlusButton enableNewTouchFeedback];
|
||||
self.uYouPlusButton.frame = CGRectMake(0, 0, 40, 40);
|
||||
|
||||
if ([%c(YTPageStyleController) pageStyle] == 0) {
|
||||
UIImage *setButtonMode = [UIImage imageWithContentsOfFile:uYouPlusMainSettingsPath];
|
||||
setButtonMode = [setButtonMode imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||
[self.uYouPlusButton setImage:setButtonMode forState:UIControlStateNormal];
|
||||
[self.uYouPlusButton setTintColor:UIColor.blackColor];
|
||||
}
|
||||
else if ([%c(YTPageStyleController) pageStyle] == 1) {
|
||||
UIImage *setButtonMode = [UIImage imageWithContentsOfFile:uYouPlusMainSettingsPath];
|
||||
setButtonMode = [setButtonMode imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||
[self.uYouPlusButton setImage:setButtonMode forState:UIControlStateNormal];
|
||||
[self.uYouPlusButton setTintColor:UIColor.whiteColor];
|
||||
}
|
||||
|
||||
[self.uYouPlusButton addTarget:self action:@selector(uYouPlusRootOptionsAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[retVal insertObject:self.uYouPlusButton atIndex:0];
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
- (NSMutableArray *)visibleButtons {
|
||||
NSMutableArray *retVal = %orig.mutableCopy;
|
||||
[self setLeadingPadding:+10];
|
||||
if (self.uYouPlusButton) {
|
||||
[self.uYouPlusButton removeFromSuperview];
|
||||
[self addSubview:self.uYouPlusButton];
|
||||
[retVal insertObject:self.uYouPlusButton atIndex:0];
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
%new;
|
||||
- (void)uYouPlusRootOptionsAction {
|
||||
UINavigationController *rootOptionsControllerView = [[UINavigationController alloc] initWithRootViewController:[[RootOptionsController alloc] init]];
|
||||
[rootOptionsControllerView setModalPresentationStyle:UIModalPresentationFullScreen];
|
||||
|
||||
[self._viewControllerForAncestor presentViewController:rootOptionsControllerView animated:YES completion:nil];
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide the (Connect / Thanks / Save / Report) Buttons under the Video Player - 17.x.x and up - @arichornlover (inspired by @PoomSmart's version) DEPRECATED METHOD ⚠️
|
||||
%hook _ASDisplayView
|
||||
- (void)layoutSubviews {
|
||||
|
|
@ -1361,6 +1366,12 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||
%orig([UIColor clearColor]);
|
||||
}
|
||||
%end
|
||||
%hook YTCountView
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
self.hidden = YES;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
# pragma mark - ctor
|
||||
|
|
@ -1471,6 +1482,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||
if (IS_ENABLED(@"youTabFakePremium_enabled")) {
|
||||
%init(gFakePremium);
|
||||
}
|
||||
if (IS_ENABLED(@"disablePullToFull_enabled")) {
|
||||
%init(gDisablePullToFull);
|
||||
}
|
||||
|
||||
// YTNoModernUI - @arichorn
|
||||
BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled");
|
||||
|
|
@ -1497,15 +1511,25 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"hidePlayNextInQueue_enabled"];
|
||||
}
|
||||
if (![allKeys containsObject:@"relatedVideosAtTheEndOfYTVideos"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"relatedVideosAtTheEndOfYTVideos"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"relatedVideosAtTheEndOfYTVideos"];
|
||||
}
|
||||
if (![allKeys containsObject:@"shortsProgressBar"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"shortsProgressBar"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"shortsProgressBar"];
|
||||
}
|
||||
if (![allKeys containsObject:@"RYD-ENABLED"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"RYD-ENABLED"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"RYD-ENABLED"];
|
||||
}
|
||||
if (![allKeys containsObject:@"YouPiPEnabled"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"YouPiPEnabled"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"YouPiPEnabled"];
|
||||
}
|
||||
// Broken uYou 3.0.3 setting: No Suggested Videos at The Video End
|
||||
// Set default to allow autoplay, user can disable later
|
||||
if (![allKeys containsObject:@"noSuggestedVideoAtEnd"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"noSuggestedVideoAtEnd"];
|
||||
}
|
||||
// Broken uYou 3.0.2 setting: Playback Speed Controls
|
||||
// Set default to disabled
|
||||
if (![allKeys containsObject:@"showPlaybackRate"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#import "RootOptionsController.h"
|
||||
#import "ColourOptionsController.h"
|
||||
#import "ColourOptionsController2.h"
|
||||
#import "AppIconOptionsController.h"
|
||||
|
||||
#define VERSION_STRING [[NSString stringWithFormat:@"%@", @(OS_STRINGIFY(TWEAK_VERSION))] stringByReplacingOccurrencesOfString:@"\"" withString:@""]
|
||||
#define SHOW_RELAUNCH_YT_SNACKBAR [[%c(GOOHUDManagerInternal) sharedInstance] showMessageMainThread:[%c(YTHUDMessage) messageWithText:LOC(@"RESTART_YOUTUBE")]]
|
||||
|
|
@ -134,6 +135,34 @@ extern NSBundle *uYouPlusBundle();
|
|||
];
|
||||
[sectionItems addObject:exitYT];
|
||||
|
||||
SECTION_HEADER(LOC(@"📺 App Personalization"));
|
||||
# pragma mark - uYouEnhanced Extras Menu
|
||||
YTSettingsSectionItem *customAppMenu = [%c(YTSettingsSectionItem)
|
||||
itemWithTitle:LOC(@"uYouEnhanced Extras Menu")
|
||||
titleDescription:LOC(@"This menu includes App Color Customization & Clearing the Cache 🗑️")
|
||||
accessibilityIdentifier:nil
|
||||
detailTextBlock:nil
|
||||
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
RootOptionsController *rootOptionsController = [[RootOptionsController alloc] init];
|
||||
[settingsViewController.navigationController pushViewController:rootOptionsController animated:YES];
|
||||
return YES;
|
||||
}
|
||||
];
|
||||
[sectionItems addObject:customAppMenu];
|
||||
|
||||
YTSettingsSectionItem *appIcon = [%c(YTSettingsSectionItem)
|
||||
itemWithTitle:LOC(@"Change App Icon")
|
||||
titleDescription:nil
|
||||
accessibilityIdentifier:nil
|
||||
detailTextBlock:nil
|
||||
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
AppIconOptionsController *appIconController = [[AppIconOptionsController alloc] init];
|
||||
[settingsViewController.navigationController pushViewController:appIconController animated:YES];
|
||||
return YES;
|
||||
}
|
||||
];
|
||||
[sectionItems addObject:appIcon];
|
||||
|
||||
# pragma mark - App theme
|
||||
SECTION_HEADER(LOC(@"THEME_OPTIONS"));
|
||||
|
||||
|
|
@ -229,6 +258,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
SWITCH_ITEM2(LOC(@"PINCH_TO_ZOOM"), LOC(@"PINCH_TO_ZOOM_DESC"), @"pinchToZoom_enabled");
|
||||
SWITCH_ITEM(LOC(@"YT_MINIPLAYER"), LOC(@"YT_MINIPLAYER_DESC"), @"ytMiniPlayer_enabled");
|
||||
SWITCH_ITEM2(LOC(@"STOCK_VOLUME_HUD"), LOC(@"STOCK_VOLUME_HUD_DESC"), @"stockVolumeHUD_enabled");
|
||||
SWITCH_ITEM2(LOC(@"Disable pull-to-fullscreen gesture"), LOC(@"Disable the drag gesture to enter vertical fullscreen. Only applies to landscape videos."), @"disablePullToFull_enabled");
|
||||
|
||||
# pragma mark - Video controls overlay options
|
||||
SECTION_HEADER(LOC(@"VIDEO_PLAYER_OPTIONS"));
|
||||
|
|
@ -238,6 +268,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
SWITCH_ITEM(LOC(@"HIDE_YTMUSIC_BUTTON"), LOC(@"HIDE_YTMUSIC_BUTTON_DESC"), @"hideYTMusicButton_enabled");
|
||||
SWITCH_ITEM(LOC(@"HIDE_AUTOPLAY_SWITCH"), LOC(@"HIDE_AUTOPLAY_SWITCH_DESC"), @"hideAutoplaySwitch_enabled");
|
||||
SWITCH_ITEM(LOC(@"HIDE_SUBTITLES_BUTTON"), LOC(@"HIDE_SUBTITLES_BUTTON_DESC"), @"hideCC_enabled");
|
||||
SWITCH_ITEM(LOC(@"Hide Video Title (in Fullscreen)"), LOC(@"Hides and Disables the Video Title and including the functionality that was shown on the Top Left of the Video Player."), @"hideVideoTitle_enabled");
|
||||
SWITCH_ITEM(LOC(@"Hide Collapse (Arrow) Button"), LOC(@"Hides and Disables the Arrow Button in the Top Left of the Video Player."), @"disableCollapseButton_enabled");
|
||||
SWITCH_ITEM(LOC(@"Hide Fullscreen Button"), LOC(@"Hides and Disables the Fullscreen Button in the Video Player."), @"disableFullscreenButton_enabled");
|
||||
SWITCH_ITEM(LOC(@"HIDE_HUD_MESSAGES"), LOC(@"HIDE_HUD_MESSAGES_DESC"), @"hideHUD_enabled");
|
||||
|
|
|
|||
|
|
@ -181,25 +181,6 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||
}
|
||||
%end
|
||||
|
||||
// iSponsorBlock
|
||||
%hook SponsorBlockSettingsController
|
||||
- (void)viewDidLoad {
|
||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
%orig;
|
||||
self.tableView.backgroundColor = [UIColor blackColor];
|
||||
} else { return %orig; }
|
||||
}
|
||||
%end
|
||||
|
||||
%hook SponsorBlockViewController
|
||||
- (void)viewDidLoad {
|
||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
%orig;
|
||||
self.view.backgroundColor = [UIColor blackColor];
|
||||
} else { return %orig; }
|
||||
}
|
||||
%end
|
||||
|
||||
%hook UIApplication
|
||||
- (void)applicationDidFinishLaunching:(UIApplication *)application {
|
||||
if (@available(iOS 14.0, *)) {
|
||||
|
|
@ -411,25 +392,6 @@ UIColor *customHexColor;
|
|||
}
|
||||
%end
|
||||
|
||||
// iSponsorBlock
|
||||
%hook SponsorBlockSettingsController
|
||||
- (void)viewDidLoad {
|
||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
%orig;
|
||||
self.tableView.backgroundColor = customHexColor;
|
||||
} else { return %orig; }
|
||||
}
|
||||
%end
|
||||
|
||||
%hook SponsorBlockViewController
|
||||
- (void)viewDidLoad {
|
||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
%orig;
|
||||
self.view.backgroundColor = customHexColor;
|
||||
} else { return %orig; }
|
||||
}
|
||||
%end
|
||||
|
||||
// Search view
|
||||
%hook YTSearchBarView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 8513a0f3b4aeeb9f8aaf9b8d30002ba08f04d4da
|
||||
Subproject commit 95fecff296722df4a9938308c3bdb178cb690b7c
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit f3872945d98199c331b388aec1b9c26963e75cc7
|
||||
Subproject commit fbc81ebcdd77d084f50737d1d99df8d2daf6c3f7
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 8d90af33a8ace8f1e0adbaa863aed5da9a835fc4
|
||||
Subproject commit 7e2ec8305ca9cee44d5b8c47ab32bf92595700dc
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 79cfd5d5c7efc8eb69b6d920d835c6628564e76e
|
||||
Subproject commit 67e321458867029b1ffcdfa29759332835b80eca
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 8eafa0a163ffa8e7d25c54ed3c18e6c76266ea31
|
||||
Subproject commit 3b43f12a23aee37dcf21a26685f134c7afb224de
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit b5cfbac1c5ac1440a0d4c8ac1cea3fcd4083bee6
|
||||
Subproject commit 29ef6bfb8787780d14469ce718291381b82496d0
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 591fe9dc1dcfbd4591b391fe5b25301beea5e5b7
|
||||
Subproject commit 721d46407f5fe6d389d7a814969a127563d2a3e4
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 304ec97e4cc9060a80f9128b713243c92a3215d9
|
||||
Subproject commit fb2cc71e91bdbfd7a612b1d1bd2b1e875900564f
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 411333dce83e18a8d81f2bbc79bdddc10a1b4ca6
|
||||
Subproject commit df85762a81e1f6ca97d88a3bde3bdbadb726a985
|
||||