Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1827ece773 | ||
|
|
f9e98fa04d | ||
|
|
2c5d0545d7 | ||
|
|
3c33e6fed0 | ||
|
|
daa004d027 | ||
|
|
556f4dd8cf | ||
|
|
68855e71bf | ||
|
|
8fcf17572d | ||
|
|
94c58965c7 | ||
|
|
5e7b7717ff | ||
|
|
1a99fa819e | ||
|
|
0c8376fc60 | ||
|
|
5b70271968 | ||
|
|
968dc841ee | ||
|
|
ada2c00338 | ||
|
|
0e2ec9a52e | ||
|
|
274abee25d | ||
|
|
5b920d7353 | ||
|
|
34e34a4fef | ||
|
|
3e4264e3c7 | ||
|
|
e3d779cbf2 | ||
|
|
314efca54b | ||
|
|
feaeb234cc | ||
|
|
4502236d64 | ||
|
|
3154b51cf6 | ||
|
|
4f99b08a63 |
@@ -2,5 +2,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
packages
|
packages
|
||||||
obj
|
obj
|
||||||
|
tmp
|
||||||
Tweaks/uYou/*
|
Tweaks/uYou/*
|
||||||
!Tweaks/uYou/.gitkeep
|
!Tweaks/uYou/.gitkeep
|
||||||
@@ -1,33 +1,37 @@
|
|||||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||||
|
|
||||||
|
@interface YTPlaylistHeaderViewController : UIViewController
|
||||||
|
@property (nonatomic, strong, readwrite) UIView *downloadsButton;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface ASWAppSwitcherCollectionViewCell: UIView
|
||||||
|
@end
|
||||||
|
|
||||||
@interface YTMainAppVideoPlayerOverlayView : UIView
|
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||||
-(UIViewController *)_viewControllerForAncestor;
|
- (UIViewController *)_viewControllerForAncestor;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTWatchMiniBarView : UIView
|
@interface YTWatchMiniBarView : UIView
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTAsyncCollectionView : UIView
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface YTPlayerViewController (YTAFS)
|
@interface YTPlayerViewController (YTAFS)
|
||||||
- (void)autoFullscreen;
|
- (void)autoFullscreen;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTTopAlignedView : UIView
|
@interface ASScrollView : UIView
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTLightweightQTMButton : UIView
|
@interface UIKeyboardLayoutStar : UIView
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTELMView : UIView
|
@interface UIKeyboardDockView : UIView
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NIAttributedLabel : UIView
|
@interface UICandidateViewController : UIViewController
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTShareMainView : UIView
|
@interface UIPredictionViewController : UIViewController
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface UICollectionViewControllerWrapperView : UIView
|
@interface SponsorBlockSettingsController : UITableViewController
|
||||||
@end
|
@end
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uYou.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YoutubeSpeed.dylib
|
uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uYou.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YoutubeSpeed.dylib
|
||||||
|
|
||||||
|
TARGET = iphone:clang:latest:12.0
|
||||||
uYouPlus_USE_FLEX = 0
|
uYouPlus_USE_FLEX = 0
|
||||||
|
uYouPlus_USE_FISHHOOK = 1
|
||||||
ARCHS = arm64
|
ARCHS = arm64
|
||||||
MODULES = jailed
|
MODULES = jailed
|
||||||
FINALPACKAGE = 1
|
FINALPACKAGE = 1
|
||||||
@@ -12,7 +14,6 @@ BUNDLE_ID = com.google.ios.youtube
|
|||||||
|
|
||||||
uYouPlus_FILES = uYouPlus.xm Settings.xm
|
uYouPlus_FILES = uYouPlus.xm Settings.xm
|
||||||
uYouPlus_IPA = ./tmp/Payload/YouTube.app
|
uYouPlus_IPA = ./tmp/Payload/YouTube.app
|
||||||
### Important: edit the path to your decrypted YouTube IPA!!!
|
|
||||||
|
|
||||||
include $(THEOS)/makefiles/common.mk
|
include $(THEOS)/makefiles/common.mk
|
||||||
include $(THEOS_MAKE_PATH)/tweak.mk
|
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
# Table of Contents
|
# Table of Contents
|
||||||
|
|
||||||
* [Credits](#credits)
|
* [Credits](#credits)
|
||||||
@@ -10,8 +9,7 @@
|
|||||||
* [Installation](#installation)
|
* [Installation](#installation)
|
||||||
* [Support the developers!](#support-the-developers)
|
* [Support the developers!](#support-the-developers)
|
||||||
* [FAQ](#faq)
|
* [FAQ](#faq)
|
||||||
* [Building (optional)](#building-optional)
|
* [Building](#building-optional)
|
||||||
|
|
||||||
|
|
||||||
# Credits
|
# Credits
|
||||||
|
|
||||||
@@ -21,17 +19,18 @@
|
|||||||
|
|
||||||
- [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) - 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), [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/), [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).
|
- [level3tjg](https://twitter.com/level3tjg) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards) and [YTMiniplayerEnabler](https://github.com/level3tjg/YTMiniplayerEnabler).
|
||||||
|
|
||||||
- [Lyvendia](https://github.com/Lyvendia/) for [YTSpeed](https://github.com/Lyvendia/YTSpeed/)
|
- [Lyvendia](https://github.com/Lyvendia/) for [YTSpeed](https://github.com/Lyvendia/YTSpeed/)
|
||||||
|
|
||||||
|
- [YouTube Extensions](https://github.com/CokePokes/YoutubeExtensions) by [CokePokes](https://github.com/CokePokes/).
|
||||||
|
|
||||||
- [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.
|
||||||
|
|
||||||
- [theos team](https://github.com/theos/theos) for theos & theos-jailed.
|
- [theos team](https://github.com/theos/theos) for theos & theos-jailed.
|
||||||
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
1. **uYou:** uYou has a ton of features that I can't list them all. Visit [here](https://miro92.com/repo/depictions/?p=com.miro.uyou) for more info!
|
1. **uYou:** uYou has a ton of features that I can't list them all. Visit [here](https://miro92.com/repo/depictions/?p=com.miro.uyou) for more info!
|
||||||
@@ -57,7 +56,11 @@
|
|||||||
|
|
||||||
10. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
|
10. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
|
||||||
|
|
||||||
11. **YTSpeed**: add 2.25, 2.5, 2.75, and 3x playback speed
|
11. **NoYTPremium**: remove YouTube Premium upshells.
|
||||||
|
|
||||||
|
12. **YTSpeed**: add 2.25, 2.5, 2.75, and 3x playback speed
|
||||||
|
|
||||||
|
13. **YTMiniplayerEnabler**: enable Miniplayer for all YouTube videos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -67,7 +70,6 @@
|
|||||||
|
|
||||||
- Issues that related to **uYouPlus** are [here](https://github.com/qnblackcat/uYouPlus/issues/)
|
- Issues that related to **uYouPlus** are [here](https://github.com/qnblackcat/uYouPlus/issues/)
|
||||||
|
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
|
|
||||||
- **uYouPlus** (or you can call it uYou+) requires iOS & iPadOS 13.0 or later. The latest version of **uYouPlus** can be found in the [Release tab](https://github.com/qnblackcat/uYouPlus/releases).
|
- **uYouPlus** (or you can call it uYou+) requires iOS & iPadOS 13.0 or later. The latest version of **uYouPlus** can be found in the [Release tab](https://github.com/qnblackcat/uYouPlus/releases).
|
||||||
@@ -76,32 +78,35 @@
|
|||||||
|
|
||||||
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
|
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
|
||||||
|
|
||||||
- [Open in AltStore (v17.16.4-2.1)](https://tinyurl.com/2p8t49r2) - It will take a while to install because AltStore needs to download the IPA.
|
- [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.
|
||||||
|
|
||||||
- Version info: _(last update: Apr 25)_
|
- Version info: _(last update: May 16)_
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> Expand</summary>
|
<summary> ▶︎ Expand</summary>
|
||||||
|
|
||||||
| **Tweaks/App** | **Version** | **Open source** |
|
| **Tweaks/App** | **Version** | **Open source** |
|
||||||
| :------------: | :----------:| :-------------: |
|
| :------------: | :----------:| :-------------: |
|
||||||
| **YouTube** | 17.16.4 | ✖︎ |
|
| **YouTube** | 17.19.2 | ✖︎ |
|
||||||
| **uYou** | 2.1 | ✖︎ |
|
| [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) |
|
| **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) |
|
||||||
| **Alderis Color Picker** | 1.1.2| [✔︎](https://github.com/hbang/Alderis) |
|
| **Alderis Color Picker** | 1.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) |
|
| **YouRememberCaption** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) |
|
||||||
| **YTClassicVideoQuality** | 1.0.1 | [✔︎](https://github.com/PoomSmart/YTClassicVideoQuality) |
|
| **YTClassicVideoQuality** | 1.0.1 | [✔︎](https://github.com/PoomSmart/YTClassicVideoQuality) |
|
||||||
| **YTNoCheckLocalNetwork** | 1.0.2 | [✔︎](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html) |
|
| **YTNoCheckLocalNetwork** | 1.0.2 | [✔︎](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html) |
|
||||||
| **YTNoHoverCards** | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) |
|
| **YTNoHoverCards** | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) |
|
||||||
| **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.7 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
| **YTUHD** | 1.2.7 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
||||||
| **YouPiP** | 1.6.11 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
| **YouPiP** | 1.7.0 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
||||||
| **YTSpeed** | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
|
| **YTSpeed** | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
|
||||||
| **YTAutoFullScreen** | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen/) |
|
| **YTAutoFullScreen** | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen/) |
|
||||||
| **YTReExplore** | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
|
| **YTReExplore** | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
|
||||||
| **BigYTMiniPlayer** | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
|
| **BigYTMiniPlayer** | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
|
||||||
| **YTCastConfirm** | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) |
|
| **YTCastConfirm** | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) |
|
||||||
|
| **YTMiniplayerEnabler** | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -111,7 +116,7 @@ See [Installation - Wiki](https://github.com/qnblackcat/uYouPlus/wiki/Installati
|
|||||||
# Support the developers
|
# Support the developers
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>MiRO92</summary>
|
<summary>▶︎ MiRO92</summary>
|
||||||
|
|
||||||
- CashApp: https://cash.app/$MiRO92M
|
- CashApp: https://cash.app/$MiRO92M
|
||||||
|
|
||||||
@@ -119,14 +124,14 @@ See [Installation - Wiki](https://github.com/qnblackcat/uYouPlus/wiki/Installati
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Poomsmart</summary>
|
<summary>▶︎ Poomsmart</summary>
|
||||||
|
|
||||||
- Paypal: https://poomsmart.github.io/
|
- Paypal: https://poomsmart.github.io/
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Galactic-dev</summary>
|
<summary>▶︎ Galactic-dev</summary>
|
||||||
|
|
||||||
- Paypal: https://www.paypal.com/paypalme/DBrett684
|
- Paypal: https://www.paypal.com/paypalme/DBrett684
|
||||||
|
|
||||||
|
|||||||
+136
-101
@@ -1,7 +1,16 @@
|
|||||||
|
#import "Tweaks/YouTubeHeader/YTSettingsViewController.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItemManager.h"
|
||||||
|
|
||||||
|
@interface YTSettingsSectionItemManager (YouPiP)
|
||||||
|
- (void)updateuYouPlusSectionWithEntry:(id)entry;
|
||||||
|
@end
|
||||||
|
|
||||||
|
static const NSInteger uYouPlusSection = 500;
|
||||||
|
|
||||||
extern BOOL hideHUD();
|
extern BOOL hideHUD();
|
||||||
extern BOOL oled();
|
extern BOOL oled();
|
||||||
|
extern BOOL oledKB();
|
||||||
extern BOOL autoFullScreen();
|
extern BOOL autoFullScreen();
|
||||||
extern BOOL noHoverCard();
|
extern BOOL noHoverCard();
|
||||||
extern BOOL ReExplore();
|
extern BOOL ReExplore();
|
||||||
@@ -9,107 +18,133 @@ extern BOOL bigYTMiniPlayer();
|
|||||||
extern BOOL hideCC();
|
extern BOOL hideCC();
|
||||||
extern BOOL hideAutoplaySwitch();
|
extern BOOL hideAutoplaySwitch();
|
||||||
extern BOOL castConfirm();
|
extern BOOL castConfirm();
|
||||||
|
extern BOOL ytMiniPlayer();
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
%hook YTSettingsViewController
|
%hook YTAppSettingsPresentationData
|
||||||
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *>*)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
|
+ (NSArray *)settingsCategoryOrder {
|
||||||
if (category == 1) {
|
NSArray *order = %orig;
|
||||||
NSUInteger statsForNerdsIndex = [sectionItems indexOfObjectPassingTest:^BOOL (YTSettingsSectionItem *item, NSUInteger idx, BOOL *stop) {
|
NSMutableArray *mutableOrder = [order mutableCopy];
|
||||||
return item.settingItemId == 265;
|
NSUInteger insertIndex = [order indexOfObject:@(1)];
|
||||||
}];
|
if (insertIndex != NSNotFound)
|
||||||
if (statsForNerdsIndex != NSNotFound) {
|
[mutableOrder insertObject:@(uYouPlusSection) atIndex:insertIndex + 1];
|
||||||
//
|
return mutableOrder;
|
||||||
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;
|
%end
|
||||||
castConfirm.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
|
||||||
castConfirm.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
%hook YTSettingsSectionItemManager
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"castConfirm_enabled"];
|
%new - (void)updateuYouPlusSectionWithEntry:(id)entry {
|
||||||
return YES;
|
YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"];
|
||||||
};
|
|
||||||
[sectionItems insertObject:castConfirm atIndex:statsForNerdsIndex + 1];
|
YTSettingsSectionItem *ytMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Enable the Miniplayer for all videos" titleDescription:@"App restart is required."];
|
||||||
//
|
ytMiniPlayer.hasSwitch = YES;
|
||||||
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."];
|
ytMiniPlayer.switchVisible = YES;
|
||||||
hoverCardItem.hasSwitch = YES;
|
ytMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"];
|
||||||
hoverCardItem.switchVisible = YES;
|
ytMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"ytMiniPlayer_enabled"];
|
||||||
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
return YES;
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
};
|
||||||
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."];
|
||||||
[sectionItems insertObject:hoverCardItem atIndex:statsForNerdsIndex + 1];
|
castConfirm.hasSwitch = YES;
|
||||||
//
|
castConfirm.switchVisible = YES;
|
||||||
YTSettingsSectionItem *bigYTMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"New miniplayer bar style (BigYTMiniPlayer)" titleDescription:@"App restart is required."];
|
castConfirm.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
||||||
bigYTMiniPlayer.hasSwitch = YES;
|
castConfirm.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
bigYTMiniPlayer.switchVisible = YES;
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"castConfirm_enabled"];
|
||||||
bigYTMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
return YES;
|
||||||
bigYTMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
};
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"bigYTMiniPlayer_enabled"];
|
|
||||||
return YES;
|
YTSettingsSectionItem *hoverCardItem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide End screens hover cards (YTNoHoverCards)" titleDescription:@"Hide creator End screens (thumbnails) at the end of videos."];
|
||||||
};
|
hoverCardItem.hasSwitch = YES;
|
||||||
[sectionItems insertObject:bigYTMiniPlayer atIndex:statsForNerdsIndex + 2];
|
hoverCardItem.switchVisible = YES;
|
||||||
//
|
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
||||||
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
reExplore.hasSwitch = YES;
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
||||||
reExplore.switchVisible = YES;
|
return YES;
|
||||||
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
};
|
||||||
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
YTSettingsSectionItem *bigYTMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"New miniplayer bar style (BigYTMiniPlayer)" titleDescription:@"App restart is required."];
|
||||||
return YES;
|
bigYTMiniPlayer.hasSwitch = YES;
|
||||||
};
|
bigYTMiniPlayer.switchVisible = YES;
|
||||||
[sectionItems insertObject:reExplore atIndex:statsForNerdsIndex + 2];
|
bigYTMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
||||||
//
|
bigYTMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
YTSettingsSectionItem *hideCC = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Subtitles button" titleDescription:@"Hide the Subtitles button in video controls overlay. "];
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"bigYTMiniPlayer_enabled"];
|
||||||
hideCC.hasSwitch = YES;
|
return YES;
|
||||||
hideCC.switchVisible = YES;
|
};
|
||||||
hideCC.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideCC_enabled"];
|
|
||||||
hideCC.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideCC_enabled"];
|
reExplore.hasSwitch = YES;
|
||||||
return YES;
|
reExplore.switchVisible = YES;
|
||||||
};
|
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
||||||
[sectionItems insertObject:hideCC atIndex:statsForNerdsIndex + 1];
|
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
//
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
||||||
YTSettingsSectionItem *hideAutoplaySwitch = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Autoplay switch" titleDescription:@"Hide the Autoplay switch button in video controls overlay."];
|
return YES;
|
||||||
hideAutoplaySwitch.hasSwitch = YES;
|
};
|
||||||
hideAutoplaySwitch.switchVisible = YES;
|
|
||||||
hideAutoplaySwitch.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideAutoplaySwitch_enabled"];
|
YTSettingsSectionItem *hideCC = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Subtitles button" titleDescription:@"Hide the Subtitles button in video controls overlay. "];
|
||||||
hideAutoplaySwitch.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
hideCC.hasSwitch = YES;
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideAutoplaySwitch_enabled"];
|
hideCC.switchVisible = YES;
|
||||||
return YES;
|
hideCC.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideCC_enabled"];
|
||||||
};
|
hideCC.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
[sectionItems insertObject:hideAutoplaySwitch atIndex:statsForNerdsIndex + 1];
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideCC_enabled"];
|
||||||
//
|
return YES;
|
||||||
YTSettingsSectionItem *autoFUll = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Auto Full Screen (YTAutoFullScreen)" titleDescription:@"Autoplay videos at full screen."];
|
};
|
||||||
autoFUll.hasSwitch = YES;
|
|
||||||
autoFUll.switchVisible = YES;
|
YTSettingsSectionItem *hideAutoplaySwitch = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Autoplay switch" titleDescription:@"Hide the Autoplay switch button in video controls overlay."];
|
||||||
autoFUll.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
hideAutoplaySwitch.hasSwitch = YES;
|
||||||
autoFUll.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
hideAutoplaySwitch.switchVisible = YES;
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"autofull_enabled"];
|
hideAutoplaySwitch.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideAutoplaySwitch_enabled"];
|
||||||
return YES;
|
hideAutoplaySwitch.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
};
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideAutoplaySwitch_enabled"];
|
||||||
[sectionItems insertObject:autoFUll atIndex:statsForNerdsIndex + 3];
|
return YES;
|
||||||
//
|
};
|
||||||
YTSettingsSectionItem *hideHUD = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide HUD Messages" titleDescription:@"Example: CC is turned on/off, Video loop is on,..."];
|
|
||||||
hideHUD.hasSwitch = YES;
|
YTSettingsSectionItem *autoFull = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Auto Full Screen (YTAutoFullScreen)" titleDescription:@"Autoplay videos at full screen."];
|
||||||
hideHUD.switchVisible = YES;
|
autoFull.hasSwitch = YES;
|
||||||
hideHUD.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
autoFull.switchVisible = YES;
|
||||||
hideHUD.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
autoFull.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHUD_enabled"];
|
autoFull.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
return YES;
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"autofull_enabled"];
|
||||||
};
|
return YES;
|
||||||
[sectionItems insertObject:hideHUD atIndex:statsForNerdsIndex + 1];
|
};
|
||||||
//
|
|
||||||
YTSettingsSectionItem *Oleditem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Dark mode (Experimental)" titleDescription:@"WARNING: OLED Dark mode only works when YouTube is in Dark theme. App restart is required (In case OLED dark mode doesn't work: just switch between Light/Dark theme, then restart the app)."];
|
YTSettingsSectionItem *hideHUD = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide HUD Messages" titleDescription:@"Example: CC is turned on/off, Video loop is on,..."];
|
||||||
Oleditem.hasSwitch = YES;
|
hideHUD.hasSwitch = YES;
|
||||||
Oleditem.switchVisible = YES;
|
hideHUD.switchVisible = YES;
|
||||||
Oleditem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
hideHUD.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
Oleditem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
hideHUD.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHUD_enabled"];
|
||||||
return YES;
|
return YES;
|
||||||
};
|
};
|
||||||
[sectionItems insertObject:Oleditem atIndex:statsForNerdsIndex + 1];
|
|
||||||
}
|
YTSettingsSectionItem *oledDarkMode = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Dark mode (Experimental)" titleDescription:@"App restart might be needed after switching between Light/Dark theme to fully apply changes. In case OLED Dark mode doesn't work: just switch between Light/Dark theme, then restart the app."];
|
||||||
}
|
oledDarkMode.hasSwitch = YES;
|
||||||
%orig;
|
oledDarkMode.switchVisible = YES;
|
||||||
}
|
oledDarkMode.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||||
|
oledDarkMode.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
|
||||||
|
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"];
|
||||||
|
oledKeyBoard.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oledKeyBoard_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
|
||||||
|
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hoverCardItem, bigYTMiniPlayer, oledKeyBoard, oledDarkMode,reExplore]];
|
||||||
|
[delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateSectionForCategory:(NSUInteger)category withEntry:(id)entry {
|
||||||
|
if (category == uYouPlusSection) {
|
||||||
|
[self updateuYouPlusSectionWithEntry:entry];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
%end
|
%end
|
||||||
+1
-1
Submodule Tweaks/PSHeader updated: c9355cb136...352ca32523
+1
-1
Submodule Tweaks/YouPiP updated: 7a0a820109...e566dfa92b
+1
-1
Submodule Tweaks/YouTubeHeader updated: 71372d2c48...e9ef2d5a18
+1
-1
Submodule Tweaks/iSponsorBlock updated: a026656096...2cd11c4130
+12
-8
@@ -4,26 +4,30 @@
|
|||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# Check uYou
|
# Check uYou
|
||||||
if [[ ! -f Tweaks/uYou/com.miro.uyou_2.1_iphoneos-arm.deb ]]
|
if [ ! -f Tweaks/uYou/com.miro.uyou_2.1_iphoneos-arm.deb ]
|
||||||
then
|
then
|
||||||
echo -e "==> \033[1muYou v2.1 is not found. Downloading uYou (v2.1)...\033[0m"
|
echo -e "==> \033[1muYou v2.1 is not found. Downloading uYou (v2.1)...\033[0m"
|
||||||
(set -x ; curl https://miro92.com/repo/debs/com.miro.uyou_2.1_iphoneos-arm.deb --output Tweaks/uYou/com.miro.uyou_2.1_iphoneos-arm.deb)
|
(set -x ; curl https://miro92.com/repo/debs/com.miro.uyou_2.1_iphoneos-arm.deb --output Tweaks/uYou/com.miro.uyou_2.1_iphoneos-arm.deb)
|
||||||
else
|
else
|
||||||
echo -e "==> \033[1mFounded uYou (v2.1)!\033[0m"
|
echo -e "==> \033[1mFounded uYou (v2.1)!\033[0m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract uYou
|
# Extract uYou
|
||||||
echo -e "==> \033[1mExtracting uYou...\033[0m"
|
echo -e "==> \033[1mExtracting uYou...\033[0m"
|
||||||
if (cd Tweaks/uYou && tar -xf com.miro.uyou_2.1_iphoneos-arm.deb && tar -xf data.tar.*)
|
if (cd Tweaks/uYou && tar -xf com.miro.uyou_2.1_iphoneos-arm.deb && tar -xf data.tar.*)
|
||||||
then
|
then
|
||||||
echo -e "\033[1m> Extracted uYou!\033[0m"
|
echo -e "\033[1m> Extracted uYou!\033[0m"
|
||||||
else
|
else
|
||||||
echo "> \033[1mCouldn't extract uYou\033[0m"
|
echo "> \033[1mCouldn't extract uYou\033[0m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Makefile
|
# Makefile
|
||||||
|
if [ -d ./tmp ]
|
||||||
|
then
|
||||||
|
rm -rf ./tmp
|
||||||
|
fi
|
||||||
read -e -p "==> Path to the decrypted YouTube.ipa or YouTube.app: " PATHTOYT
|
read -e -p "==> Path to the decrypted YouTube.ipa or YouTube.app: " PATHTOYT
|
||||||
if [[ $PATHTOYT == *.ipa ]]
|
if [[ $PATHTOYT == *.ipa ]]
|
||||||
then
|
then
|
||||||
unzip -q "$PATHTOYT" -d ./tmp
|
unzip -q "$PATHTOYT" -d ./tmp
|
||||||
rm -rf ./tmp/Payload/YouTube.app/PlugIns/*.appex
|
rm -rf ./tmp/Payload/YouTube.app/PlugIns/*.appex
|
||||||
@@ -31,7 +35,7 @@ then
|
|||||||
make package
|
make package
|
||||||
open ./packages
|
open ./packages
|
||||||
|
|
||||||
elif [[ $PATHTOYT == *.app ]]
|
elif [[ $PATHTOYT == *.app ]]
|
||||||
then
|
then
|
||||||
mkdir -p ./tmp/Payload/
|
mkdir -p ./tmp/Payload/
|
||||||
cp -R "$PATHTOYT" ./tmp/Payload 2>/dev/null
|
cp -R "$PATHTOYT" ./tmp/Payload 2>/dev/null
|
||||||
|
|||||||
+315
-397
@@ -1,6 +1,7 @@
|
|||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <objc/runtime.h>
|
#import <objc/runtime.h>
|
||||||
|
#import <fishhook.h>
|
||||||
#import "Header.h"
|
#import "Header.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
||||||
@@ -11,7 +12,7 @@
|
|||||||
#import "Tweaks/YouTubeHeader/YTIPivotBarSupportedRenderers.h"
|
#import "Tweaks/YouTubeHeader/YTIPivotBarSupportedRenderers.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
|
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
||||||
#include <RemoteLog.h>
|
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
|
||||||
|
|
||||||
BOOL hideHUD() {
|
BOOL hideHUD() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
@@ -19,6 +20,12 @@ BOOL hideHUD() {
|
|||||||
BOOL oled() {
|
BOOL oled() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||||
}
|
}
|
||||||
|
BOOL oledKB() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"oledKeyBoard_enabled"];
|
||||||
|
}
|
||||||
|
BOOL isDarkMode() {
|
||||||
|
return ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1);
|
||||||
|
}
|
||||||
BOOL autoFullScreen() {
|
BOOL autoFullScreen() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
||||||
}
|
}
|
||||||
@@ -40,38 +47,47 @@ BOOL hideAutoplaySwitch() {
|
|||||||
BOOL castConfirm() {
|
BOOL castConfirm() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
||||||
}
|
}
|
||||||
|
BOOL ytMiniPlayer() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"];
|
||||||
|
}
|
||||||
|
|
||||||
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
// 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);
|
||||||
|
}
|
||||||
|
|
||||||
// Hide CC / Autoplay switch
|
// Hide CC / Autoplay switch
|
||||||
%hook YTMainAppControlsOverlayView
|
%hook YTMainAppControlsOverlayView
|
||||||
- (void)layoutSubviews {
|
- (void)setClosedCaptionsOrSubtitlesButtonAvailable:(BOOL)arg1 { // hide CC?!
|
||||||
%orig();
|
if (hideCC()) { return %orig(NO); }
|
||||||
if (hideAutoplaySwitch()) {
|
else { return %orig; }
|
||||||
MSHookIvar<UIView *>(self, "_autonavSwitch").hidden = YES;
|
}
|
||||||
}
|
- (void)setAutoplaySwitchButtonRenderer:(id)arg1 {
|
||||||
if (hideCC()) {
|
if (hideAutoplaySwitch()) {}
|
||||||
MSHookIvar<UIView *>(self, "_closedCaptionsOrSubtitlesButton").hidden = YES;
|
else { return %orig; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// Hide HUD Messages
|
// Hide HUD Messages
|
||||||
%hook YTHUDMessageView
|
%hook YTHUDMessageView
|
||||||
- (id)initWithMessage:(id)arg1 dismissHandler:(id)arg2 {
|
- (id)initWithMessage:(id)arg1 dismissHandler:(id)arg2 {
|
||||||
if (hideHUD()) {
|
return hideHUD() ? nil : %orig;
|
||||||
return NULL;
|
|
||||||
} else { return %orig; }
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// YTAutoFullScreen: https://github.com/PoomSmart/YTAutoFullScreen/
|
// YTAutoFullScreen: https://github.com/PoomSmart/YTAutoFullScreen/
|
||||||
%hook YTPlayerViewController
|
%hook YTPlayerViewController
|
||||||
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
||||||
if (autoFullScreen()) {
|
|
||||||
%orig;
|
%orig;
|
||||||
[NSTimer scheduledTimerWithTimeInterval:0.75 target:self selector:@selector(autoFullscreen) userInfo:nil repeats:NO];
|
if (autoFullScreen())
|
||||||
} else { return %orig; }
|
[NSTimer scheduledTimerWithTimeInterval:0.75 target:self selector:@selector(autoFullscreen) userInfo:nil repeats:NO];
|
||||||
}
|
}
|
||||||
%new
|
%new
|
||||||
- (void)autoFullscreen {
|
- (void)autoFullscreen {
|
||||||
@@ -83,45 +99,46 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
// YTNoHoverCards: https://github.com/level3tjg/YTNoHoverCards
|
// YTNoHoverCards: https://github.com/level3tjg/YTNoHoverCards
|
||||||
%hook YTCreatorEndscreenView
|
%hook YTCreatorEndscreenView
|
||||||
- (void)setHidden:(BOOL)hidden {
|
- (void)setHidden:(BOOL)hidden {
|
||||||
if (!noHoverCard())
|
if (noHoverCard())
|
||||||
hidden = YES;
|
hidden = YES;
|
||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
//YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm
|
//YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm
|
||||||
%hook MDXPlaybackRouteButtonController
|
%hook MDXPlaybackRouteButtonController
|
||||||
-(void)didPressButton:(id)arg1 {
|
- (void)didPressButton:(id)arg1 {
|
||||||
if (castConfirm()) {
|
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];
|
||||||
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||||
%orig;
|
%orig;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
UIAlertAction* noButton = [%c(UIAlertAction)
|
UIAlertAction* noButton = [%c(UIAlertAction)
|
||||||
actionWithTitle:@"Cancel"
|
actionWithTitle:@"Cancel"
|
||||||
style:UIAlertActionStyleDefault
|
style:UIAlertActionStyleDefault
|
||||||
handler: ^(UIAlertAction * action) {
|
handler: ^(UIAlertAction * action) {
|
||||||
return;
|
return;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[alertController addAction:defaultAction];
|
[alertController addAction:defaultAction];
|
||||||
[alertController addAction:noButton];
|
[alertController addAction:noButton];
|
||||||
|
|
||||||
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
|
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
|
||||||
if([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
|
if ([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
|
||||||
rootViewController = ((UINavigationController *)rootViewController).viewControllers.firstObject;
|
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];
|
||||||
}
|
}
|
||||||
if([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
|
return %orig;
|
||||||
rootViewController = ((UITabBarController *)rootViewController).selectedViewController;
|
|
||||||
}
|
|
||||||
if ([rootViewController presentedViewController] != nil) {
|
|
||||||
rootViewController = [rootViewController presentedViewController];
|
|
||||||
}
|
|
||||||
[rootViewController presentViewController:alertController animated:YES completion:nil];
|
|
||||||
} else { return %orig; }
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
@@ -148,432 +165,329 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|||||||
%hook YTColdConfig
|
%hook YTColdConfig
|
||||||
- (BOOL)shouldUseAppThemeSetting { return YES; }
|
- (BOOL)shouldUseAppThemeSetting { return YES; }
|
||||||
- (BOOL)respectDeviceCaptionSetting { return NO; }
|
- (BOOL)respectDeviceCaptionSetting { return NO; }
|
||||||
|
- (BOOL)isEnhancedSearchBarEnabled { return YES; }
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// OLED
|
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
||||||
// Thanks u/DGh0st for his very well explained comment - https://www.reddit.com/r/jailbreakdevelopers/comments/9uape7/comment/e94sq80/
|
%hook YTCommerceEventGroupHandler
|
||||||
// Thanks sinfool for his flex patch which brings OLED Dark mode for YouTube - "Color Customizer (YouTube) OLED"
|
- (void)addEventHandlers {}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTInterstitialPromoEventGroupHandler
|
||||||
|
- (void)addEventHandlers {}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTPromosheetEventGroupHandler
|
||||||
|
- (void)addEventHandlers {}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTPromoThrottleController
|
||||||
|
- (BOOL)canShowThrottledPromo { return NO; }
|
||||||
|
- (BOOL)canShowThrottledPromoWithFrequencyCap:(id)arg1 { return NO; }
|
||||||
|
- (BOOL)canShowThrottledPromoWithFrequencyCaps:(id)arg1 { return NO; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTIShowFullscreenInterstitialCommand
|
||||||
|
- (BOOL)shouldThrottleInterstitial { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTSurveyController
|
||||||
|
- (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Hide the download playlist button of uYou cuz it's broken
|
||||||
|
%hook YTPlaylistHeaderViewController
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
%orig;
|
||||||
|
self.downloadsButton.hidden = YES;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// OLED dark mode by BandarHL
|
||||||
|
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||||
|
|
||||||
%group gOLED
|
%group gOLED
|
||||||
%hook UIView
|
%hook YTCommonColorPalette
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (UIColor *)brandBackgroundSolid {
|
||||||
if ([self.nextResponder isKindOfClass:%c(DownloadedVC)]) //uYou
|
if (self.pageStyle == 1) {
|
||||||
arg1 = oledColor;
|
return oledColor;
|
||||||
if ([self.nextResponder isKindOfClass:%c(DownloadsPagerVC)]) //uYou
|
|
||||||
arg1 = oledColor;
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(DownloadingVC)]) //uYou
|
|
||||||
arg1 = oledColor;
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(PlayerVC)]) //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(YCHLiveChatView)])
|
|
||||||
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;
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(YTEditSheetControllerHeader)])
|
|
||||||
arg1 = oledColor;
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(YTDialogContainerScrollView)])
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
//- (void)layoutSubviews {
|
|
||||||
// %orig;
|
|
||||||
// if ([self.nextResponder isKindOfClass:%c(YTALDialog)])
|
|
||||||
// self.backgroundColor = oledColor;
|
|
||||||
//}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook UIControl // this sucks I know :/
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(YTShareMainView)])
|
|
||||||
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;
|
return %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)brandBackgroundPrimary {
|
||||||
|
if (self.pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)brandBackgroundSecondary {
|
||||||
|
if (self.pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)staticBrandBlack {
|
||||||
|
if (self.pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
- (UIColor *)generalBackgroundA {
|
||||||
|
if (self.pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTDialogContainerScrollView
|
// Account view controller
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook YTAccountPanelBodyViewController
|
||||||
arg1 = oledColor;
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
%orig;
|
if (pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTTopAlignedView
|
%hook YTInnerTubeCollectionViewController
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
arg1 = oledColor;
|
if (pageStyle == 1) {
|
||||||
%orig;
|
return oledColor;
|
||||||
}
|
}
|
||||||
-(void)layoutSubviews { // Dune - https://github.com/Skittyblock/Dune/blob/9b1df9790230115b7553cc9dbadf36889018d7f9/Tweak.xm#L70
|
return %orig;
|
||||||
%orig;
|
|
||||||
MSHookIvar<UIView *>(self, "_contentView").backgroundColor = oledColor;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook MDXQueueView // Cast queue
|
// Explore
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook ASScrollView
|
||||||
arg1 = oledColor;
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
if (isDarkMode()) {
|
||||||
|
self.backgroundColor = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTChannelProfileEditorView
|
// uYou's page
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook DownloadedVC
|
||||||
arg1 = oledColor;
|
- (UIColor *)ytBackgroundColor {
|
||||||
%orig;
|
if (isDarkMode()) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTChannelSubMenuView //
|
%hook DownloadsPagerVC
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (UIColor *)ytBackgroundColor {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTChannelListSubMenuView // sub -
|
%hook DownloadingVC
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (UIColor *)ytBackgroundColor {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTCommentView
|
%hook PlayerVC
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (UIColor *)ytBackgroundColor {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTCreateCommentAccessoryView
|
// SponsorBlock settings
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook SponsorBlockSettingsController
|
||||||
arg1 = oledColor;
|
- (void)viewDidLoad {
|
||||||
%orig;
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
|
%orig;
|
||||||
|
self.tableView.backgroundColor = oledColor;
|
||||||
|
} else {
|
||||||
|
return %orig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTCreateCommentTextView
|
// uYou & YT player, and downloading view controller
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook _LNPopupBarContentView
|
||||||
arg1 = oledColor;
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig;
|
if (isDarkMode()) {
|
||||||
}
|
return %orig([UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9]);
|
||||||
%end
|
}
|
||||||
|
return %orig;
|
||||||
%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
|
%end
|
||||||
|
|
||||||
%hook YTWatchMiniBarView
|
%hook YTWatchMiniBarView
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9];
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig([UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9]);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTPlaylistMiniBarView
|
// Search View
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook YTSearchBarView
|
||||||
arg1 = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9];
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig;
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook _LNPopupBarContentView // uYou player
|
%hook YTSearchBoxView
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9];
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTEngagementPanelHeaderView
|
// Comment view
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook YTCreateCommentAccessoryView // community reply comment
|
||||||
arg1 = oledColor;
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
%orig;
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTChannelMobileHeaderView
|
%hook YTCreateCommentTextView
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
- (void)setTextColor:(UIColor *)color { // fix black text in #Shorts video's comment
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig ([UIColor whiteColor]);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTInlineSignInView
|
%hook YTFormattedStringLabel // YT is werid...
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig ([UIColor clearColor]);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTHeaderView //Stt bar
|
%hook YCHLiveChatActionPanelView // live chat comment
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTTabTitlesView // Tab bar - mychannel
|
%hook YTEmojiTextView // live chat comment
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTSettingsCell // Settings
|
// Separation lines
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
%hook YTCollectionSeparatorView
|
||||||
arg1 = oledColor;
|
- (void)didMoveToWindow {
|
||||||
%orig;
|
if (isDarkMode()) {}
|
||||||
}
|
else {
|
||||||
%end
|
return %orig();
|
||||||
|
}
|
||||||
%hook GOODialogView // 3 dots menu
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTCollectionView //sharesheet
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// Open link with...
|
||||||
%hook ASWAppSwitchingSheetHeaderView
|
%hook ASWAppSwitchingSheetHeaderView
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASWAppSwitchingSheetFooterView
|
%hook ASWAppSwitchingSheetFooterView
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTCollectionSeparatorView
|
%hook ASWAppSwitcherCollectionViewCell
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)didMoveToWindow {
|
||||||
arg1 = oledColor;
|
if (isDarkMode()) {
|
||||||
%orig;
|
%orig;
|
||||||
|
self.subviews[1].backgroundColor = oledColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
- (void)layoutSubviews {}
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTLightweightQTMButton
|
// this sucks :/
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
// %hook UIView
|
||||||
if([self.nextResponder isKindOfClass:%c(YTShareMainView)]) {
|
// - (void)setBackgroundColor:(UIColor *)color {
|
||||||
arg1 = oledColor;
|
// 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
|
||||||
|
%hook UIPredictionViewController
|
||||||
|
- (void)loadView {
|
||||||
%orig;
|
%orig;
|
||||||
}
|
[self.view setBackgroundColor:oledColor];
|
||||||
}
|
}
|
||||||
-(void)setCustomTitleColor:(id)arg1 {
|
%end
|
||||||
arg1 = [UIColor whiteColor];
|
|
||||||
|
%hook UICandidateViewController
|
||||||
|
- (void)loadView {
|
||||||
|
%orig;
|
||||||
|
[self.view setBackgroundColor:oledColor];
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIKeyboardDockView
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
self.backgroundColor = oledColor;
|
||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTShareBusyView // sharesheet load
|
%hook UIKeyboardLayoutStar
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
- (void)didMoveToWindow {
|
||||||
arg1 = oledColor;
|
self.backgroundColor = oledColor;
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTPageView
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTWatchView
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTSearchBarView
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTSearchSuggestionCollectionViewCell
|
|
||||||
-(void)updateColors {}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook UISearchBarBackground
|
|
||||||
-(void)setBarTintColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTELMView // upload videos
|
%hook UIKBRenderConfig // Prediction text color
|
||||||
-(void)layoutSubviews {
|
- (void)setLightKeyboard:(BOOL)arg1 { %orig(NO); }
|
||||||
%orig;
|
|
||||||
self.backgroundColor = oledColor;
|
|
||||||
}
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTMealBarPromoView
|
|
||||||
-(void)setBackgroundColor:(id)arg1 { // Offline
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook NIAttributedLabel
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(UIScrollView)])
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
////
|
|
||||||
/*
|
|
||||||
%hook UICollectionView
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(UICollectionViewControllerWrapperView)])
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTShortsGalleryHeaderView // upload videos heaer (gallery)
|
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
|
||||||
arg1 = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook _ASDisplayView // edit your videos
|
|
||||||
-(void)layoutSubviews {
|
|
||||||
if ([self.nextResponder isKindOfClass:%c(ELMView)])
|
|
||||||
self.backgroundColor = oledColor;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook ASCollectionView
|
|
||||||
-(void)layoutSubviews {
|
|
||||||
self.backgroundColor = 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
|
%end
|
||||||
|
|
||||||
// YTReExplore: https://github.com/PoomSmart/YTReExplore/
|
// YTReExplore: https://github.com/PoomSmart/YTReExplore/
|
||||||
@@ -613,20 +527,20 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||||||
// BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
|
// BigYTMiniPlayer: https://github.com/Galactic-Dev/BigYTMiniPlayer
|
||||||
%group Main
|
%group Main
|
||||||
%hook YTWatchMiniBarView
|
%hook YTWatchMiniBarView
|
||||||
-(void)setWatchMiniPlayerLayout:(int)arg1 {
|
- (void)setWatchMiniPlayerLayout:(int)arg1 {
|
||||||
%orig(1);
|
%orig(1);
|
||||||
}
|
}
|
||||||
-(int)watchMiniPlayerLayout {
|
- (int)watchMiniPlayerLayout {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
-(void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
%orig;
|
%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);
|
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
|
%end
|
||||||
|
|
||||||
%hook YTMainAppVideoPlayerOverlayView
|
%hook YTMainAppVideoPlayerOverlayView
|
||||||
-(BOOL)isUserInteractionEnabled {
|
- (BOOL)isUserInteractionEnabled {
|
||||||
if([[self _viewControllerForAncestor].parentViewController.parentViewController isKindOfClass:%c(YTWatchMiniBarViewController)]) {
|
if([[self _viewControllerForAncestor].parentViewController.parentViewController isKindOfClass:%c(YTWatchMiniBarViewController)]) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
@@ -636,14 +550,18 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
|
rebind_symbols((struct rebinding[1]){{"class_addMethod", (void *)hook_class_addMethod, (void **)&orig_class_addMethod}}, 1);
|
||||||
%init;
|
%init;
|
||||||
if (oled() && ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1)) {
|
if (oled()) {
|
||||||
%init(gOLED);
|
%init(gOLED);
|
||||||
}
|
}
|
||||||
|
if (oledKB()) {
|
||||||
|
%init(gOLEDKB);
|
||||||
|
}
|
||||||
if (ReExplore()) {
|
if (ReExplore()) {
|
||||||
%init(gReExplore)
|
%init(gReExplore);
|
||||||
}
|
}
|
||||||
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
||||||
%init(Main)
|
%init(Main);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user