Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b83081fd57 | ||
|
|
c74b5203f7 | ||
|
|
920b7c4882 | ||
|
|
d469f31270 | ||
|
|
f910c416ef | ||
|
|
fb0e5073ae | ||
|
|
f9e05fee77 | ||
|
|
ec7eec660b | ||
|
|
2e6c19c060 | ||
|
|
bb3b8ed310 |
@@ -1,5 +1,8 @@
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
|
||||
@interface SSOConfiguration : NSObject
|
||||
@end
|
||||
|
||||
@interface YTMainAppControlsOverlayView: UIView
|
||||
@end
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
- [HASHBANG Productions](https://github.com/hbang) for [Alderis Color Picker](https://github.com/hbang/Alderis) - a dependency of iSponsorBlock.
|
||||
|
||||
- [PoomSmart](https://twitter.com/poomsmart) - the developer of many tweaks used by uYouPlus, include: [NoYTPremium](https://github.com/PoomSmart/NoYTPremium/), [YouRememberCaption](https://www.ios-repo-updates.com/repository/poomsmart/package/com.ps.youremembercaption/), [YTClassicVideoQuality](https://poomsmart.github.io/repo/depictions/ytclassicvideoquality.html), [YTNoCheckLocalNetwork](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html), [YTSystemAppearance](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html), [YTAutoFullScreen](https://github.com/PoomSmart/YTAutoFullScreen/), [YTReExplore](https://github.com/PoomSmart/YTReExplore/), [YTUHD](https://poomsmart.github.io/repo/depictions/ytuhd.html), [YouPiP](https://poomsmart.github.io/repo/depictions/youpip.html), and [Return YouTube Dislike](https://github.com/PoomSmart/Return-YouTube-Dislikes)
|
||||
- [PoomSmart](https://twitter.com/poomsmart) - the developer of many tweaks used by uYouPlus, include: [NoYTPremium](https://github.com/PoomSmart/NoYTPremium/), [YouRememberCaption](https://www.ios-repo-updates.com/repository/poomsmart/package/com.ps.youremembercaption/), [YTClassicVideoQuality](https://poomsmart.github.io/repo/depictions/ytclassicvideoquality.html), [YTNoCheckLocalNetwork](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html), [YTSystemAppearance](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html), [YTAutoFullScreen](https://github.com/PoomSmart/YTAutoFullScreen/), [YTReExplore](https://github.com/PoomSmart/YTReExplore/), [IAmYouTube](https://github.com/PoomSmart/IAmYouTube), [YTUHD](https://poomsmart.github.io/repo/depictions/ytuhd.html), [YouPiP](https://poomsmart.github.io/repo/depictions/youpip.html), and [Return YouTube Dislike](https://github.com/PoomSmart/Return-YouTube-Dislikes)
|
||||
|
||||
- [level3tjg](https://twitter.com/level3tjg) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards) and [YTMiniplayerEnabler](https://github.com/level3tjg/YTMiniplayerEnabler).
|
||||
|
||||
@@ -78,21 +78,21 @@
|
||||
|
||||
- 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.21.3-2.1)](https://tinyurl.com/52j8xeee) - It will take a while to install because AltStore needs to download the IPA.
|
||||
|
||||
- Version info: _(last update: May 16)_
|
||||
- Version info: _(last update: June 01)_
|
||||
|
||||
<details>
|
||||
<summary> ▶︎ Expand</summary>
|
||||
|
||||
| **Tweaks/App** | **Version** | **Open source** |
|
||||
| :------------: | :----------:| :-------------: |
|
||||
| **YouTube** | 17.19.2 | ✖︎ |
|
||||
| **YouTube** | 17.21.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) |
|
||||
| **iSponsorBlock** | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
||||
| **Alderis Color Picker** | 1.1.2| [✔︎](https://github.com/hbang/Alderis) |
|
||||
| **Alderis Color Picker** | 1.2| [✔︎](https://github.com/hbang/Alderis) |
|
||||
| **NoYTPremium** | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium/) |
|
||||
| **YouRememberCaption** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) |
|
||||
| **YTClassicVideoQuality** | 1.0.1 | [✔︎](https://github.com/PoomSmart/YTClassicVideoQuality) |
|
||||
@@ -101,6 +101,7 @@
|
||||
| **YTSystemAppearance** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html) |
|
||||
| **YTUHD** | 1.2.7 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
||||
| **YouPiP** | 1.7.0 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
||||
| **IAmYouTube** | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) |
|
||||
| **YTSpeed** | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
|
||||
| **YTAutoFullScreen** | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen/) |
|
||||
| **YTReExplore** | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
|
||||
|
||||
+3
-4
@@ -31,14 +31,13 @@ extern BOOL hidePreviousAndNextButton();
|
||||
[mutableOrder insertObject:@(uYouPlusSection) atIndex:insertIndex + 1];
|
||||
return mutableOrder;
|
||||
}
|
||||
|
||||
%end
|
||||
|
||||
%hook YTSettingsSectionItemManager
|
||||
%new - (void)updateuYouPlusSectionWithEntry:(id)entry {
|
||||
YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"];
|
||||
|
||||
YTSettingsSectionItem *hidePreviousAndNextButton = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Previous and Next button" titleDescription:@""];
|
||||
YTSettingsSectionItem *hidePreviousAndNextButton = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Previous and Next button" titleDescription:@"Hide Previous and Next button in video controls overlay."];
|
||||
hidePreviousAndNextButton.hasSwitch = YES;
|
||||
hidePreviousAndNextButton.switchVisible = YES;
|
||||
hidePreviousAndNextButton.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePreviousAndNextButton_enabled"];
|
||||
@@ -47,7 +46,7 @@ extern BOOL hidePreviousAndNextButton();
|
||||
return YES;
|
||||
};
|
||||
|
||||
YTSettingsSectionItem *ytMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Enable the Miniplayer for all YouTube videos" titleDescription:@""];
|
||||
YTSettingsSectionItem *ytMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Enable the Miniplayer for all YouTube videos" titleDescription:@"Kid videos for example."];
|
||||
ytMiniPlayer.hasSwitch = YES;
|
||||
ytMiniPlayer.switchVisible = YES;
|
||||
ytMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"];
|
||||
@@ -56,7 +55,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"];
|
||||
|
||||
+1
-1
Submodule Tweaks/Alderis updated: f8b577ebf7...2c4304d844
+1
-1
Submodule Tweaks/PSHeader updated: 352ca32523...ac9324f441
+1
-1
Submodule Tweaks/YouTubeHeader updated: 8b5380d920...81125ef7b5
+99
-58
@@ -1,6 +1,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <objc/runtime.h>
|
||||
#import <dlfcn.h>
|
||||
#import "Header.h"
|
||||
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
@@ -12,6 +13,9 @@
|
||||
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
||||
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
|
||||
|
||||
#define YT_BUNDLE_ID @"com.google.ios.youtube"
|
||||
#define YT_NAME @"YouTube"
|
||||
|
||||
BOOL hideHUD() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||
}
|
||||
@@ -112,40 +116,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 +213,69 @@ BOOL ytMiniPlayer() {
|
||||
}
|
||||
%end
|
||||
|
||||
// IAmYouTube - https://github.com/PoomSmart/IAmYouTube/
|
||||
%hook YTVersionUtils
|
||||
+ (NSString *)appName { return YT_NAME; }
|
||||
+ (NSString *)appID { return YT_BUNDLE_ID; }
|
||||
%end
|
||||
|
||||
%hook GCKBUtils
|
||||
+ (NSString *)appIdentifier { return YT_BUNDLE_ID; }
|
||||
%end
|
||||
|
||||
%hook GPCDeviceInfo
|
||||
+ (NSString *)bundleId { return YT_BUNDLE_ID; }
|
||||
%end
|
||||
|
||||
%hook OGLBundle
|
||||
+ (NSString *)shortAppName { return YT_NAME; }
|
||||
%end
|
||||
|
||||
%hook GVROverlayView
|
||||
+ (NSString *)appName { return YT_NAME; }
|
||||
%end
|
||||
|
||||
%hook OGLPhenotypeFlagServiceImpl
|
||||
- (NSString *)bundleId { return YT_BUNDLE_ID; }
|
||||
%end
|
||||
|
||||
%hook SSOConfiguration
|
||||
- (id)initWithClientID:(id)clientID supportedAccountServices:(id)supportedAccountServices {
|
||||
self = %orig;
|
||||
[self setValue:YT_NAME forKey:@"_shortAppName"];
|
||||
[self setValue:YT_BUNDLE_ID forKey:@"_applicationIdentifier"];
|
||||
return self;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook NSBundle
|
||||
- (NSString *)bundleIdentifier {
|
||||
NSArray *address = [NSThread callStackReturnAddresses];
|
||||
Dl_info info = {0};
|
||||
if (dladdr((void *)[address[2] longLongValue], &info) == 0)
|
||||
return %orig;
|
||||
NSString *path = [NSString stringWithUTF8String:info.dli_fname];
|
||||
if ([path hasPrefix:NSBundle.mainBundle.bundlePath])
|
||||
return YT_BUNDLE_ID;
|
||||
return %orig;
|
||||
}
|
||||
- (id)objectForInfoDictionaryKey:(NSString *)key {
|
||||
if ([key isEqualToString:@"CFBundleIdentifier"])
|
||||
return YT_BUNDLE_ID;
|
||||
if ([key isEqualToString:@"CFBundleDisplayName"] || [key isEqualToString:@"CFBundleName"])
|
||||
return YT_NAME;
|
||||
return %orig;
|
||||
}
|
||||
%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,22 +385,11 @@ 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();
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
// uYou & YT player, and downloading view controller
|
||||
%hook _LNPopupBarContentView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
return %orig([UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9]);
|
||||
}
|
||||
return %orig;
|
||||
} else { return %orig; }
|
||||
}
|
||||
%end
|
||||
|
||||
// YT player
|
||||
%hook YTWatchMiniBarView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
if (isDarkMode()) {
|
||||
@@ -417,9 +474,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,22 +498,11 @@ 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
|
||||
|
||||
// this sucks :/
|
||||
// %hook UIView
|
||||
// - (void)setBackgroundColor:(UIColor *)color {
|
||||
// if (isDarkMode()) {
|
||||
// if ([self.nextResponder isKindOfClass:%c(YTHUDMessageView)]) { color = oledColor; }
|
||||
// %orig;
|
||||
// }
|
||||
// return %orig;
|
||||
// }
|
||||
// %end
|
||||
%end
|
||||
|
||||
%group gOLEDKB // OLED keyboard by @ichitaso <3 - http://gist.github.com/ichitaso/935100fd53a26f18a9060f7195a1be0e
|
||||
@@ -568,7 +612,4 @@ static void replaceTab(YTIGuideResponse *response) {
|
||||
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
||||
%init(Main);
|
||||
}
|
||||
if (castConfirm()) {
|
||||
%init(gYTCastconfirm);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user