Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b83081fd57 | ||
|
|
c74b5203f7 | ||
|
|
920b7c4882 | ||
|
|
d469f31270 | ||
|
|
f910c416ef | ||
|
|
fb0e5073ae | ||
|
|
f9e05fee77 | ||
|
|
ec7eec660b | ||
|
|
2e6c19c060 | ||
|
|
bb3b8ed310 | ||
|
|
b94a5cc967 | ||
|
|
8b50a3c1b7 | ||
|
|
025dc4d2cb | ||
|
|
9860fdb4e8 | ||
|
|
5e9d719882 | ||
|
|
f63cfa8b43 | ||
|
|
37b6b1e07e |
@@ -1,5 +1,11 @@
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
|
||||
@interface SSOConfiguration : NSObject
|
||||
@end
|
||||
|
||||
@interface YTMainAppControlsOverlayView: UIView
|
||||
@end
|
||||
|
||||
@interface YTPlaylistHeaderViewController : UIViewController
|
||||
@property (nonatomic, strong, readwrite) UIView *downloadsButton;
|
||||
@end
|
||||
|
||||
@@ -2,7 +2,7 @@ uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uY
|
||||
|
||||
TARGET = iphone:clang:latest:12.0
|
||||
uYouPlus_USE_FLEX = 0
|
||||
uYouPlus_USE_FISHHOOK = 1
|
||||
uYouPlus_USE_FISHHOOK = 0
|
||||
ARCHS = arm64
|
||||
MODULES = jailed
|
||||
FINALPACKAGE = 1
|
||||
|
||||
@@ -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/2p9e76h2) - 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) |
|
||||
|
||||
+13
-4
@@ -19,6 +19,7 @@ extern BOOL hideCC();
|
||||
extern BOOL hideAutoplaySwitch();
|
||||
extern BOOL castConfirm();
|
||||
extern BOOL ytMiniPlayer();
|
||||
extern BOOL hidePreviousAndNextButton();
|
||||
|
||||
// Settings
|
||||
%hook YTAppSettingsPresentationData
|
||||
@@ -30,14 +31,22 @@ extern BOOL ytMiniPlayer();
|
||||
[mutableOrder insertObject:@(uYouPlusSection) atIndex:insertIndex + 1];
|
||||
return mutableOrder;
|
||||
}
|
||||
|
||||
%end
|
||||
|
||||
%hook YTSettingsSectionItemManager
|
||||
%new - (void)updateuYouPlusSectionWithEntry:(id)entry {
|
||||
YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"];
|
||||
|
||||
YTSettingsSectionItem *ytMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Enable the Miniplayer for all videos" titleDescription:@"App restart is required."];
|
||||
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"];
|
||||
hidePreviousAndNextButton.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hidePreviousAndNextButton_enabled"];
|
||||
return YES;
|
||||
};
|
||||
|
||||
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"];
|
||||
@@ -127,7 +136,7 @@ extern BOOL ytMiniPlayer();
|
||||
return YES;
|
||||
};
|
||||
|
||||
YTSettingsSectionItem *oledKeyBoard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Keyboard (Experimental)" titleDescription:@"Might not working properly in some cases . App restart is required."];
|
||||
YTSettingsSectionItem *oledKeyBoard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Keyboard (Experimental)" titleDescription:@"Might not working properly in some cases. App restart is required."];
|
||||
oledKeyBoard.hasSwitch = YES;
|
||||
oledKeyBoard.switchVisible = YES;
|
||||
oledKeyBoard.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oledKeyBoard_enabled"];
|
||||
@@ -136,7 +145,7 @@ extern BOOL ytMiniPlayer();
|
||||
return YES;
|
||||
};
|
||||
|
||||
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hoverCardItem, bigYTMiniPlayer, oledKeyBoard, oledDarkMode,reExplore]];
|
||||
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hidePreviousAndNextButton, hoverCardItem, bigYTMiniPlayer, oledKeyBoard, oledDarkMode,reExplore]];
|
||||
[delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO];
|
||||
}
|
||||
|
||||
|
||||
+1
-1
Submodule Tweaks/Alderis updated: f8b577ebf7...2c4304d844
+1
-1
Submodule Tweaks/PSHeader updated: 352ca32523...ac9324f441
+1
-1
Submodule Tweaks/YTUHD updated: 9916e88bc5...00c5e38ca9
+1
-1
Submodule Tweaks/YouPiP updated: e566dfa92b...66cae4c924
+1
-1
Submodule Tweaks/YouTubeHeader updated: e9ef2d5a18...81125ef7b5
+1
-1
Submodule Tweaks/iSponsorBlock updated: 2cd11c4130...a936217c38
+89
-41
@@ -1,10 +1,9 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <objc/runtime.h>
|
||||
#import <fishhook.h>
|
||||
#import <dlfcn.h>
|
||||
#import "Header.h"
|
||||
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTWatchController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTIGuideResponse.h"
|
||||
@@ -14,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"];
|
||||
}
|
||||
@@ -44,6 +46,9 @@ BOOL hideCC() {
|
||||
BOOL hideAutoplaySwitch() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideAutoplaySwitch_enabled"];
|
||||
}
|
||||
BOOL hidePreviousAndNextButton() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePreviousAndNextButton_enabled"];
|
||||
}
|
||||
BOOL castConfirm() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
||||
}
|
||||
@@ -53,15 +58,12 @@ BOOL ytMiniPlayer() {
|
||||
|
||||
// Tweaks
|
||||
// YTMiniPlayerEnabler: https://github.com/level3tjg/YTMiniplayerEnabler/
|
||||
static BOOL (*orig_class_addMethod)(Class, SEL, IMP, const char *);
|
||||
static BOOL hook_class_addMethod(Class cls, SEL name, IMP imp, const char *types) {
|
||||
if (ytMiniPlayer() && [cls isEqual:%c(YTIMiniplayerRenderer)] && [NSStringFromSelector(name) hasPrefix:@"has"]) {
|
||||
imp = imp_implementationWithBlock(^BOOL(id self, SEL _cmd) {
|
||||
return NO;
|
||||
});
|
||||
}
|
||||
return orig_class_addMethod(cls, name, imp, types);
|
||||
%hook YTWatchMiniBarViewController
|
||||
- (void)updateMiniBarPlayerStateFromRenderer {
|
||||
if (ytMiniPlayer()) {}
|
||||
else { return %orig; }
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide CC / Autoplay switch
|
||||
%hook YTMainAppControlsOverlayView
|
||||
@@ -73,6 +75,14 @@ static BOOL hook_class_addMethod(Class cls, SEL name, IMP imp, const char *types
|
||||
if (hideAutoplaySwitch()) {}
|
||||
else { return %orig; }
|
||||
}
|
||||
- (void)layoutSubviews {
|
||||
if (hidePreviousAndNextButton()) {
|
||||
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
|
||||
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
|
||||
%orig;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide HUD Messages
|
||||
@@ -137,8 +147,8 @@ static BOOL hook_class_addMethod(Class cls, SEL name, IMP imp, const char *types
|
||||
rootViewController = [rootViewController presentedViewController];
|
||||
}
|
||||
[rootViewController presentViewController:alertController animated:YES completion:nil];
|
||||
}
|
||||
return %orig;
|
||||
} else { return %orig; }
|
||||
|
||||
}
|
||||
%end
|
||||
|
||||
@@ -203,6 +213,69 @@ static BOOL hook_class_addMethod(Class cls, SEL name, IMP imp, const char *types
|
||||
}
|
||||
%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];
|
||||
|
||||
@@ -312,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()) {
|
||||
@@ -412,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
|
||||
|
||||
@@ -438,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
|
||||
@@ -550,7 +599,6 @@ static void replaceTab(YTIGuideResponse *response) {
|
||||
%end
|
||||
|
||||
%ctor {
|
||||
rebind_symbols((struct rebinding[1]){{"class_addMethod", (void *)hook_class_addMethod, (void **)&orig_class_addMethod}}, 1);
|
||||
%init;
|
||||
if (oled()) {
|
||||
%init(gOLED);
|
||||
|
||||
Reference in New Issue
Block a user