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/ - 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> <details>
<summary> ▶︎ Expand</summary> <summary> ▶︎ Expand</summary>
| **Tweaks/App** | **Version** | **Open source** | | **Tweaks/App** | **Version** | **Open source** |
| :------------: | :----------:| :-------------: | | :------------: | :----------:| :-------------: |
| **YouTube** | 17.19.2 | ✖︎ | | **YouTube** | 17.19.3 | ✖︎ |
| [uYou](https://github.com/MiRO92/uYou-for-YouTube) | 2.1 | ✖︎ | | [uYou](https://github.com/MiRO92/uYou-for-YouTube) | 2.1 | ✖︎ |
| [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions/) | 1.2 | ✖︎ | | [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions/) | 1.2 | ✖︎ |
| **Return YouTube Dislike** | 1.6.4 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) | | **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; 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.hasSwitch = YES;
castConfirm.switchVisible = YES; castConfirm.switchVisible = YES;
castConfirm.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"]; castConfirm.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
+17 -15
View File
@@ -112,9 +112,9 @@ BOOL ytMiniPlayer() {
%end %end
//YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm //YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm
%group gYTCastconfirm
%hook MDXPlaybackRouteButtonController %hook MDXPlaybackRouteButtonController
- (void)didPressButton:(id)arg1 { - (void)didPressButton:(id)arg1 {
if (castConfirm()) {
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting" UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting"
message:@"Are you sure you want to start casting?" message:@"Are you sure you want to start casting?"
preferredStyle:UIAlertControllerStyleAlert]; preferredStyle:UIAlertControllerStyleAlert];
@@ -125,8 +125,9 @@ BOOL ytMiniPlayer() {
UIAlertAction* noButton = [%c(UIAlertAction) UIAlertAction* noButton = [%c(UIAlertAction)
actionWithTitle:@"Cancel" actionWithTitle:@"Cancel"
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler: ^(UIAlertAction * action) { return; } handler: ^(UIAlertAction * action) {
]; return;
}];
[alertController addAction:defaultAction]; [alertController addAction:defaultAction];
[alertController addAction:noButton]; [alertController addAction:noButton];
@@ -142,10 +143,10 @@ BOOL ytMiniPlayer() {
rootViewController = [rootViewController presentedViewController]; rootViewController = [rootViewController presentedViewController];
} }
[rootViewController presentViewController:alertController animated:YES completion:nil]; [rootViewController presentViewController:alertController animated:YES completion:nil];
return %orig; } else { return %orig; }
} }
%end %end
%end
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/12 // Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/12
%hook YTAdsInnerTubeContextDecorator %hook YTAdsInnerTubeContextDecorator
@@ -208,6 +209,14 @@ BOOL ytMiniPlayer() {
} }
%end %end
// Workaround for issue #54
%hook YTMainAppVideoPlayerOverlayViewController
- (void)updateRelatedVideos {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"relatedVideosAtTheEndOfYTVideos"] == NO) {}
else { return %orig; }
}
%end
// OLED dark mode by BandarHL // OLED dark mode by BandarHL
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0]; 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) { if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
%orig; %orig;
self.tableView.backgroundColor = oledColor; self.tableView.backgroundColor = oledColor;
} else { } else { return %orig; }
return %orig();
}
} }
%end %end
@@ -417,9 +424,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTCollectionSeparatorView %hook YTCollectionSeparatorView
- (void)didMoveToWindow { - (void)didMoveToWindow {
if (isDarkMode()) {} if (isDarkMode()) {}
else { else { return %orig; }
return %orig();
}
} }
%end %end
@@ -443,8 +448,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook ASWAppSwitcherCollectionViewCell %hook ASWAppSwitcherCollectionViewCell
- (void)didMoveToWindow { - (void)didMoveToWindow {
if (isDarkMode()) { if (isDarkMode()) {
%orig;
self.subviews[1].backgroundColor = oledColor; self.subviews[1].backgroundColor = oledColor;
%orig;
} }
} }
%end %end
@@ -568,7 +573,4 @@ static void replaceTab(YTIGuideResponse *response) {
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) { if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
%init(Main); %init(Main);
} }
if (castConfirm()) {
%init(gYTCastconfirm);
}
} }