Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4119cc4796 | ||
|
|
9763459838 | ||
|
|
ef0c1a8930 | ||
|
|
ca57262430 | ||
|
|
83c685c28f |
@@ -10,7 +10,7 @@ TWEAK_NAME = uYouPlus
|
|||||||
DISPLAY_NAME = YouTube
|
DISPLAY_NAME = YouTube
|
||||||
BUNDLE_ID = com.google.ios.youtube
|
BUNDLE_ID = com.google.ios.youtube
|
||||||
|
|
||||||
uYouPlus_FILES = uYouPlus.x
|
uYouPlus_FILES = uYouPlus.xm
|
||||||
uYouPlus_IPA = /path/to/decrypted/YouTube/IPA
|
uYouPlus_IPA = /path/to/decrypted/YouTube/IPA
|
||||||
### Important: edit the path to your decrypted YouTube IPA!!!
|
### Important: edit the path to your decrypted YouTube IPA!!!
|
||||||
|
|
||||||
|
|||||||
@@ -15,20 +15,20 @@
|
|||||||
|
|
||||||
# Credits
|
# Credits
|
||||||
|
|
||||||
- [MiRO92](https://twitter.com/miro92?s=21) for [uYou](https://github.com/MiRO92/uYou-for-YouTube).
|
- [MiRO92](https://twitter.com/miro92) for [uYou](https://github.com/MiRO92/uYou-for-YouTube).
|
||||||
|
|
||||||
- [Galactic-Dev](https://github.com/Galactic-Dev) and [Luewii](https://github.com/Luewii) for [iSponsorBlock](https://github.com/Galactic-Dev/iSponsorBlock).
|
- [Galactic-Dev](https://github.com/Galactic-Dev) and [Luewii](https://github.com/Luewii) for [iSponsorBlock](https://github.com/Galactic-Dev/iSponsorBlock).
|
||||||
|
|
||||||
- [Lillie](https://github.com/LillieWeeb001), [PoomSmart](https://twitter.com/poomsmart?s=21) and [kirb](https://twitter.com/hbkirb?s=21) for [YouTube Dislike Return](https://github.com/PoomSmart/Return-YouTube-Dislikes)
|
|
||||||
|
|
||||||
- [HASHBANG Productions](https://github.com/hbang) for [Alderis Color Picker](https://github.com/hbang/Alderis) - a dependency of iSponsorBlock.
|
- [HASHBANG Productions](https://github.com/hbang) for [Alderis Color Picker](https://github.com/hbang/Alderis) - a dependency of iSponsorBlock.
|
||||||
|
|
||||||
- [PoomSmart](https://twitter.com/poomsmart?s=21) - the developer of many tweaks used by uYouPlus, include: [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), [YTUHD](https://poomsmart.github.io/repo/depictions/ytuhd.html) and [YouPiP](https://poomsmart.github.io/repo/depictions/youpip.html).
|
- [PoomSmart](https://twitter.com/poomsmart) - the developer of many tweaks used by uYouPlus, include: [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), [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?s=21) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards).
|
- [level3tjg](https://twitter.com/level3tjg) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards).
|
||||||
|
|
||||||
- [Al4ise](https://github.com/Al4ise) for [Azule](https://github.com/Al4ise/Azule), a tool used to inject jailbreak tweaks into jailed iOS apps.
|
- [Al4ise](https://github.com/Al4ise) for [Azule](https://github.com/Al4ise/Azule), a tool used to inject jailbreak tweaks into jailed iOS apps.
|
||||||
|
|
||||||
|
- [Lyvendia](https://github.com/Lyvendia/) for [YTSpeed](https://github.com/Lyvendia/YTSpeed/)
|
||||||
|
|
||||||
- [theos team](https://github.com/theos/theos) for theos & theos-jailed.
|
- [theos team](https://github.com/theos/theos) for theos & theos-jailed.
|
||||||
|
|
||||||
|
|
||||||
@@ -54,6 +54,9 @@
|
|||||||
8. **YTNoCheckLocalNetwork**: block the Local Network permission popup.
|
8. **YTNoCheckLocalNetwork**: block the Local Network permission popup.
|
||||||
|
|
||||||
9. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
|
9. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
|
||||||
|
|
||||||
|
10. **YTSpeed**: add 2.25, 2.5, 2.75, and 3x playback speed
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
# Known issues
|
# Known issues
|
||||||
@@ -71,16 +74,16 @@
|
|||||||
|
|
||||||
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
|
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
|
||||||
|
|
||||||
- [Open in AltStore (v17.12.5-2.1)](https://tinyurl.com/3jvhjbc8) - It will take a while to install because AltStore needs to download the IPA.
|
- [Open in AltStore (v17.14.2-2.1)](https://tinyurl.com/2a9ybxvu) - It will take a while to install because AltStore needs to download the IPA.
|
||||||
|
|
||||||
- Version info: _(last update: Apr 01)_
|
- Version info: _(last update: Apr 13)_
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> Expand</summary>
|
<summary> Expand</summary>
|
||||||
|
|
||||||
| **Tweaks/App** | **Version** | **Open source** |
|
| **Tweaks/App** | **Version** | **Open source** |
|
||||||
| :------------: | :----------:| :-------------: |
|
| :------------: | :----------:| :-------------: |
|
||||||
| **YouTube** | 17.12.5 | ✖︎ |
|
| **YouTube** | 17.14.2 | ✖︎ |
|
||||||
| **uYou** | 2.1 | ✖︎ |
|
| **uYou** | 2.1 | ✖︎ |
|
||||||
| **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) |
|
||||||
| **iSponsorBlock** | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
| **iSponsorBlock** | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
||||||
@@ -92,6 +95,7 @@
|
|||||||
| **YTSystemAppearance** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html) |
|
| **YTSystemAppearance** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html) |
|
||||||
| **YTUHD** | 1.2.6 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
| **YTUHD** | 1.2.6 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
||||||
| **YouPiP** | 1.6.9 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
| **YouPiP** | 1.6.9 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
||||||
|
|**YTSpeed**| 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed.git) |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
-100
@@ -1,100 +0,0 @@
|
|||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
|
|
||||||
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/12
|
|
||||||
|
|
||||||
%hook YTAdsInnerTubeContextDecorator
|
|
||||||
- (void)decorateContext:(id)arg1 {
|
|
||||||
%orig(nil);
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
|
|
||||||
// YouRememberCaption: https://www.ios-repo-updates.com/repository/poomsmart/package/com.ps.youremembercaption/
|
|
||||||
|
|
||||||
%hook YTColdConfig
|
|
||||||
- (BOOL)respectDeviceCaptionSetting {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
|
|
||||||
// YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality
|
|
||||||
|
|
||||||
@interface YTVideoQualitySwitchOriginalController : NSObject
|
|
||||||
- (instancetype)initWithParentResponder:(id)responder;
|
|
||||||
@end
|
|
||||||
|
|
||||||
%hook YTVideoQualitySwitchControllerFactory
|
|
||||||
|
|
||||||
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder {
|
|
||||||
Class originalClass = %c(YTVideoQualitySwitchOriginalController);
|
|
||||||
return originalClass ? [[originalClass alloc] initWithParentResponder:responder] : %orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
|
|
||||||
// YTNoCheckLocalNetwork: https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html
|
|
||||||
|
|
||||||
%hook YTHotConfig
|
|
||||||
|
|
||||||
- (BOOL)isPromptForLocalNetworkPermissionsEnabled {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
// YTNoHoverCards: https://github.com/level3tjg/YTNoHoverCards
|
|
||||||
|
|
||||||
@interface YTCollectionViewCell : UICollectionViewCell
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface YTSettingsCell : YTCollectionViewCell
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface YTSettingsSectionItem : NSObject
|
|
||||||
@property BOOL hasSwitch;
|
|
||||||
@property BOOL switchVisible;
|
|
||||||
@property BOOL on;
|
|
||||||
@property BOOL (^switchBlock)(YTSettingsCell *, BOOL);
|
|
||||||
@property int settingItemId;
|
|
||||||
- (instancetype)initWithTitle:(NSString *)title titleDescription:(NSString *)titleDescription;
|
|
||||||
@end
|
|
||||||
|
|
||||||
%hook YTSettingsViewController
|
|
||||||
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *>*)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
|
|
||||||
if (category == 1) {
|
|
||||||
NSInteger appropriateIdx = [sectionItems indexOfObjectPassingTest:^BOOL(YTSettingsSectionItem *item, NSUInteger idx, BOOL *stop) {
|
|
||||||
return item.settingItemId == 294;
|
|
||||||
}];
|
|
||||||
if (appropriateIdx != NSNotFound) {
|
|
||||||
YTSettingsSectionItem *hoverCardItem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Show End screens hover cards" titleDescription:@"Allows creator End screens (thumbnails) to appear at the end of videos"];
|
|
||||||
hoverCardItem.hasSwitch = YES;
|
|
||||||
hoverCardItem.switchVisible = YES;
|
|
||||||
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
|
||||||
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
|
||||||
return YES;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:hoverCardItem atIndex:appropriateIdx + 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTCreatorEndscreenView
|
|
||||||
- (void)setHidden:(BOOL)hidden {
|
|
||||||
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"])
|
|
||||||
hidden = YES;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
|
|
||||||
// YTSystemAppearance: https://poomsmart.github.io/repo/depictions/ytsystemappearance.html
|
|
||||||
|
|
||||||
%hook YTColdConfig
|
|
||||||
- (BOOL)shouldUseAppThemeSetting {
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
+541
@@ -0,0 +1,541 @@
|
|||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <objc/runtime.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"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTIGuideResponseSupportedRenderers.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTIPivotBarSupportedRenderers.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
||||||
|
#include <RemoteLog.h>
|
||||||
|
|
||||||
|
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||||
|
-(UIViewController *)_viewControllerForAncestor;
|
||||||
|
@end
|
||||||
|
@interface YTWatchMiniBarView : UIView
|
||||||
|
@end
|
||||||
|
@interface YTAsyncCollectionView : UIView
|
||||||
|
@end
|
||||||
|
@interface YTPlayerViewController (YTAFS)
|
||||||
|
- (void)autoFullscreen;
|
||||||
|
@end
|
||||||
|
|
||||||
|
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||||
|
|
||||||
|
BOOL hideHUD() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
|
}
|
||||||
|
BOOL oled() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||||
|
}
|
||||||
|
BOOL autoFullScreen() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
||||||
|
}
|
||||||
|
BOOL noHoverCard() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
||||||
|
}
|
||||||
|
BOOL ReExplore() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
||||||
|
}
|
||||||
|
BOOL bigYTMiniPlayer() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Settings
|
||||||
|
%hook YTSettingsViewController
|
||||||
|
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *>*)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
|
||||||
|
if (category == 1) {
|
||||||
|
NSUInteger statsForNerdsIndex = [sectionItems indexOfObjectPassingTest:^BOOL (YTSettingsSectionItem *item, NSUInteger idx, BOOL *stop) {
|
||||||
|
return item.settingItemId == 265;
|
||||||
|
}];
|
||||||
|
if (statsForNerdsIndex != NSNotFound) {
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *hoverCardItem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Show End screens hover cards (YTNoHoverCards)" titleDescription:@"Allows creator End screens (thumbnails) to appear at the end of videos."];
|
||||||
|
hoverCardItem.hasSwitch = YES;
|
||||||
|
hoverCardItem.switchVisible = YES;
|
||||||
|
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
||||||
|
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:hoverCardItem atIndex:statsForNerdsIndex + 2];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *Oleditem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Dark mode (Experimental)" titleDescription:@"WARNING: You must set YouTube's appearance to Dark theme before enabling OLED dark mode (not tested on iPad yet). App restart is required."];
|
||||||
|
Oleditem.hasSwitch = YES;
|
||||||
|
Oleditem.switchVisible = YES;
|
||||||
|
Oleditem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||||
|
Oleditem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:Oleditem atIndex:statsForNerdsIndex - 11];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *autoFUll = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Auto Full Screen (YTAutoFullScreen)" titleDescription:@"Autoplay videos at full screen."];
|
||||||
|
autoFUll.hasSwitch = YES;
|
||||||
|
autoFUll.switchVisible = YES;
|
||||||
|
autoFUll.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
||||||
|
autoFUll.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"autofull_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:autoFUll atIndex:statsForNerdsIndex + 2];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *hideHUD = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide HUD Messages" titleDescription:@"Example: CC is turned on/off, Video loop is on,... App restart is required."];
|
||||||
|
hideHUD.hasSwitch = YES;
|
||||||
|
hideHUD.switchVisible = YES;
|
||||||
|
hideHUD.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
|
hideHUD.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHUD_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:hideHUD atIndex:statsForNerdsIndex + 2];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
||||||
|
reExplore.hasSwitch = YES;
|
||||||
|
reExplore.switchVisible = YES;
|
||||||
|
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
||||||
|
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:reExplore atIndex:statsForNerdsIndex + 4];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *bigYTMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Bigger miniplayer bar (BigYTMiniPlayer)" titleDescription:@"App restart is required."];
|
||||||
|
bigYTMiniPlayer.hasSwitch = YES;
|
||||||
|
bigYTMiniPlayer.switchVisible = YES;
|
||||||
|
bigYTMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
||||||
|
bigYTMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"bigYTMiniPlayer_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:bigYTMiniPlayer atIndex:statsForNerdsIndex + 4];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Hide HUD Messages
|
||||||
|
%hook YTHUDMessageView
|
||||||
|
- (id)initWithMessage:(id)arg1 dismissHandler:(id)arg2 {
|
||||||
|
if (hideHUD()) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTAutoFullScreen: https://github.com/PoomSmart/YTAutoFullScreen/
|
||||||
|
%hook YTPlayerViewController
|
||||||
|
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
||||||
|
if (autoFullScreen()) {
|
||||||
|
%orig;
|
||||||
|
[NSTimer scheduledTimerWithTimeInterval:0.75 target:self selector:@selector(autoFullscreen) userInfo:nil repeats:NO];
|
||||||
|
} else { return %orig; }
|
||||||
|
}
|
||||||
|
%new
|
||||||
|
- (void)autoFullscreen {
|
||||||
|
YTWatchController *watchController = [self valueForKey:@"_UIDelegate"];
|
||||||
|
[watchController showFullScreen];
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTNoHoverCards: https://github.com/level3tjg/YTNoHoverCards
|
||||||
|
%hook YTCreatorEndscreenView
|
||||||
|
- (void)setHidden:(BOOL)hidden {
|
||||||
|
if (!noHoverCard())
|
||||||
|
hidden = YES;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/12
|
||||||
|
%hook YTAdsInnerTubeContextDecorator
|
||||||
|
- (void)decorateContext:(id)arg1 { %orig(nil); }
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality
|
||||||
|
%hook YTVideoQualitySwitchControllerFactory
|
||||||
|
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder {
|
||||||
|
Class originalClass = %c(YTVideoQualitySwitchOriginalController);
|
||||||
|
return originalClass ? [[originalClass alloc] initWithParentResponder:responder] : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTNoCheckLocalNetwork: https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html
|
||||||
|
%hook YTHotConfig
|
||||||
|
- (BOOL)isPromptForLocalNetworkPermissionsEnabled { return NO; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTSystemAppearance: https://poomsmart.github.io/repo/depictions/ytsystemappearance.html
|
||||||
|
// YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html
|
||||||
|
%hook YTColdConfig
|
||||||
|
- (BOOL)shouldUseAppThemeSetting { return YES; }
|
||||||
|
- (BOOL)respectDeviceCaptionSetting { return NO; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
// OLED
|
||||||
|
// Thanks u/DGh0st for his very well explained comment - https://www.reddit.com/r/jailbreakdevelopers/comments/9uape7/comment/e94sq80/
|
||||||
|
// Thanks sinfool for his flex patch which brings OLED Dark mode for YouTube - "Color Customizer (YouTube) OLED"
|
||||||
|
%group gOLED
|
||||||
|
%hook UIView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(DownloadedVC)]) //uYou
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(DownloadsPagerVC)]) //uYou
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTLinkCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTCommentsHeaderView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTSearchView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTSearchBoxView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTEngagementPanelHeaderView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTEngagementPanelView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTPivotBarView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTHUDMessageView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTChipCloudCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YCHLiveChatTextCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YCHLiveChatViewerEngagementCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTSlideForActionsView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTPlaylistHeaderView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTAsyncCollectionView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTFeedHeaderView)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTMessageCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(YTPlaylistPanelProminentThumbnailVideoCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
if ([self.nextResponder isKindOfClass:%c(ASWAppSwitcherCollectionViewCell)])
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTAsyncCollectionView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
if([self.nextResponder isKindOfClass:%c(YTRelatedVideosCollectionViewController)]) {
|
||||||
|
arg1 = [oledColor colorWithAlphaComponent:0.0];
|
||||||
|
} else if([self.nextResponder isKindOfClass:%c(YTFullscreenMetadataHighlightsCollectionViewController)]) {
|
||||||
|
arg1 = [oledColor colorWithAlphaComponent:0.0];
|
||||||
|
} else {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTTopAlignedView // Example from Dune - https://github.com/Skittyblock/Dune/blob/9b1df9790230115b7553cc9dbadf36889018d7f9/Tweak.xm#L700
|
||||||
|
-(void)layoutSubviews {
|
||||||
|
%orig;
|
||||||
|
MSHookIvar<UIView *>(self, "_contentView").backgroundColor = oledColor;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook MDXQueueView // Cast queue
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTChannelProfileEditorView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTChannelSubMenuView //
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTChannelListSubMenuView // sub -
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTCommentView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTCreateCommentAccessoryView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTCreateCommentTextView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YCHLiveChatActionPanelView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTEmojiTextView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTShareTitleView // Share sheet
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTNavigationBar
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
-(void)setBarTintColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTPrivacyTosFooterView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTWatchMiniBarView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9];
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTPlaylistMiniBarView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9];
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTEngagementPanelHeaderView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTChannelMobileHeaderView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTInlineSignInView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTHeaderView //Stt bar
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTTabTitlesView // Tab bar - mychannel
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTSettingsCell // Settings
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook GOODialogView // 3 dots menu
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTCollectionView //sharesheet
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook ASWAppSwitchingSheetHeaderView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook ASWAppSwitchingSheetFooterView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTCollectionSeparatorView
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
- (void)layoutSubviews {}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTSearchSuggestionCollectionViewCell
|
||||||
|
-(void)updateColors {}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UISearchBarBackground
|
||||||
|
-(void)setBarTintColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
/*
|
||||||
|
%hook YTChannelProfileDescriptionEditorView // edit profile Description
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook YTChannelProfileNameEditorView // edit profile Name
|
||||||
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
hook GOOTextField
|
||||||
|
-(void)setBackgroundColor:(id)arg1 { // edit profile Description
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%hook GOOMultilineTextField//
|
||||||
|
-(void)setBackgroundColor:(id)arg1 { // edit profile Name
|
||||||
|
arg1 = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
*/
|
||||||
|
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTReExplore: https://github.com/PoomSmart/YTReExplore/
|
||||||
|
%group gReExplore
|
||||||
|
static void replaceTab(YTIGuideResponse *response) {
|
||||||
|
NSMutableArray <YTIGuideResponseSupportedRenderers *> *renderers = [response itemsArray];
|
||||||
|
for (YTIGuideResponseSupportedRenderers *guideRenderers in renderers) {
|
||||||
|
YTIPivotBarRenderer *pivotBarRenderer = [guideRenderers pivotBarRenderer];
|
||||||
|
NSMutableArray <YTIPivotBarSupportedRenderers *> *items = [pivotBarRenderer itemsArray];
|
||||||
|
NSUInteger shortIndex = [items indexOfObjectPassingTest:^BOOL(YTIPivotBarSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
||||||
|
return [[[renderers pivotBarItemRenderer] pivotIdentifier] isEqualToString:@"FEshorts"];
|
||||||
|
}];
|
||||||
|
if (shortIndex != NSNotFound) {
|
||||||
|
[items removeObjectAtIndex:shortIndex];
|
||||||
|
NSUInteger exploreIndex = [items indexOfObjectPassingTest:^BOOL(YTIPivotBarSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
||||||
|
return [[[renderers pivotBarItemRenderer] pivotIdentifier] isEqualToString:[%c(YTIBrowseRequest) browseIDForExploreTab]];
|
||||||
|
}];
|
||||||
|
if (exploreIndex == NSNotFound) {
|
||||||
|
YTIPivotBarSupportedRenderers *exploreTab = [%c(YTIPivotBarRenderer) pivotSupportedRenderersWithBrowseId:[%c(YTIBrowseRequest) browseIDForExploreTab] title:@"Explore" iconType:292];
|
||||||
|
[items insertObject:exploreTab atIndex:1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%hook YTGuideServiceCoordinator
|
||||||
|
- (void)handleResponse:(YTIGuideResponse *)response withCompletion:(id)completion {
|
||||||
|
replaceTab(response);
|
||||||
|
%orig(response, completion);
|
||||||
|
}
|
||||||
|
- (void)handleResponse:(YTIGuideResponse *)response error:(id)error completion:(id)completion {
|
||||||
|
replaceTab(response);
|
||||||
|
%orig(response, error, completion);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
|
// BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
|
||||||
|
%group Main
|
||||||
|
%hook YTWatchMiniBarView
|
||||||
|
-(void)setWatchMiniPlayerLayout:(int)arg1 {
|
||||||
|
%orig(1);
|
||||||
|
}
|
||||||
|
-(int)watchMiniPlayerLayout {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
-(void)layoutSubviews {
|
||||||
|
%orig;
|
||||||
|
self.frame = CGRectMake(([UIScreen mainScreen].bounds.size.width - self.frame.size.width), self.frame.origin.y, self.frame.size.width, self.frame.size.height);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTMainAppVideoPlayerOverlayView
|
||||||
|
-(BOOL)isUserInteractionEnabled {
|
||||||
|
if([[self _viewControllerForAncestor].parentViewController.parentViewController isKindOfClass:%c(YTWatchMiniBarViewController)]) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
|
%ctor {
|
||||||
|
%init;
|
||||||
|
if (oled()) {
|
||||||
|
%init(gOLED);
|
||||||
|
}
|
||||||
|
if (ReExplore()) {
|
||||||
|
%init(gReExplore)
|
||||||
|
}
|
||||||
|
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
||||||
|
%init(Main)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user