Compare commits

..
Author SHA1 Message Date
qnblackcat fb0e5073ae temporary fix for issue #54 2022-05-24 01:13:41 +07:00
qnblackcat f9e05fee77 update submodules 2022-05-24 01:12:42 +07:00
qnblackcat ec7eec660b fix YTCastconfirm, code clean up 2022-05-21 12:51:11 +07:00
qnblackcat 2e6c19c060 update description 2022-05-21 12:50:50 +07:00
qnblackcat bb3b8ed310 v17.19.3-2.1 2022-05-20 21:44:58 +07:00
6 changed files with 46 additions and 44 deletions
+3 -3
View File
@@ -78,16 +78,16 @@
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
- [Open in AltStore (v17.19.2-2.1)](https://tinyurl.com/2s49jpru) - It will take a while to install because AltStore needs to download the IPA.
- [Open in AltStore (v17.19.3-2.1)](https://tinyurl.com/5n8c64zv) - It will take a while to install because AltStore needs to download the IPA.
- Version info: _(last update: May 16)_
- Version info: _(last update: May 20)_
<details>
<summary> ▶︎ Expand</summary>
| **Tweaks/App** | **Version** | **Open source** |
| :------------: | :----------:| :-------------: |
| **YouTube** | 17.19.2 | ✖︎ |
| **YouTube** | 17.19.3 | ✖︎ |
| [uYou](https://github.com/MiRO92/uYou-for-YouTube) | 2.1 | ✖︎ |
| [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions/) | 1.2 | ✖︎ |
| **Return YouTube Dislike** | 1.6.4 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
+1 -1
View File
@@ -56,7 +56,7 @@ extern BOOL hidePreviousAndNextButton();
return YES;
};
YTSettingsSectionItem *castConfirm = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Confirm alert before casting (YTCastConfirm)" titleDescription:@"Show a confirm alert before casting to prevent accidentally hijacking TV. App restart is required."];
YTSettingsSectionItem *castConfirm = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Confirm alert before casting (YTCastConfirm)" titleDescription:@"Show a confirm alert before casting to prevent accidentally hijacking TV."];
castConfirm.hasSwitch = YES;
castConfirm.switchVisible = YES;
castConfirm.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
+39 -37
View File
@@ -112,40 +112,41 @@ BOOL ytMiniPlayer() {
%end
//YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm
%group gYTCastconfirm
%hook MDXPlaybackRouteButtonController
- (void)didPressButton:(id)arg1 {
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting"
message:@"Are you sure you want to start casting?"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
%orig;
}];
if (castConfirm()) {
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting"
message:@"Are you sure you want to start casting?"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
%orig;
}];
UIAlertAction* noButton = [%c(UIAlertAction)
actionWithTitle:@"Cancel"
style:UIAlertActionStyleDefault
handler: ^(UIAlertAction * action) { return; }
];
UIAlertAction* noButton = [%c(UIAlertAction)
actionWithTitle:@"Cancel"
style:UIAlertActionStyleDefault
handler: ^(UIAlertAction * action) {
return;
}];
[alertController addAction:defaultAction];
[alertController addAction:noButton];
[alertController addAction:defaultAction];
[alertController addAction:noButton];
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
if ([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
rootViewController = ((UINavigationController *)rootViewController).viewControllers.firstObject;
}
if ([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
rootViewController = ((UITabBarController *)rootViewController).selectedViewController;
}
if ([rootViewController presentedViewController] != nil) {
rootViewController = [rootViewController presentedViewController];
}
[rootViewController presentViewController:alertController animated:YES completion:nil];
} else { return %orig; }
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
if ([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
rootViewController = ((UINavigationController *)rootViewController).viewControllers.firstObject;
}
if ([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
rootViewController = ((UITabBarController *)rootViewController).selectedViewController;
}
if ([rootViewController presentedViewController] != nil) {
rootViewController = [rootViewController presentedViewController];
}
[rootViewController presentViewController:alertController animated:YES completion:nil];
return %orig;
}
%end
%end
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/12
%hook YTAdsInnerTubeContextDecorator
@@ -208,6 +209,14 @@ BOOL ytMiniPlayer() {
}
%end
// Workaround for issue #54
%hook YTMainAppVideoPlayerOverlayViewController
- (void)updateRelatedVideos {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"relatedVideosAtTheEndOfYTVideos"] == NO) {}
else { return %orig; }
}
%end
// OLED dark mode by BandarHL
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
@@ -317,9 +326,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
%orig;
self.tableView.backgroundColor = oledColor;
} else {
return %orig();
}
} else { return %orig; }
}
%end
@@ -417,9 +424,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTCollectionSeparatorView
- (void)didMoveToWindow {
if (isDarkMode()) {}
else {
return %orig();
}
else { return %orig; }
}
%end
@@ -443,8 +448,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook ASWAppSwitcherCollectionViewCell
- (void)didMoveToWindow {
if (isDarkMode()) {
%orig;
self.subviews[1].backgroundColor = oledColor;
%orig;
}
}
%end
@@ -568,7 +573,4 @@ static void replaceTab(YTIGuideResponse *response) {
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
%init(Main);
}
if (castConfirm()) {
%init(gYTCastconfirm);
}
}