Compare commits
70
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b83081fd57 | ||
|
|
c74b5203f7 | ||
|
|
920b7c4882 | ||
|
|
d469f31270 | ||
|
|
f910c416ef | ||
|
|
fb0e5073ae | ||
|
|
f9e05fee77 | ||
|
|
ec7eec660b | ||
|
|
2e6c19c060 | ||
|
|
bb3b8ed310 | ||
|
|
b94a5cc967 | ||
|
|
8b50a3c1b7 | ||
|
|
025dc4d2cb | ||
|
|
9860fdb4e8 | ||
|
|
5e9d719882 | ||
|
|
f63cfa8b43 | ||
|
|
37b6b1e07e | ||
|
|
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 | ||
|
|
ae1dc1a701 | ||
|
|
f1eb708e08 | ||
|
|
9298cadbf8 | ||
|
|
efe8670c51 | ||
|
|
fb5781865c | ||
|
|
afb6bd9842 | ||
|
|
8ee749dad1 | ||
|
|
a38e37f6e9 | ||
|
|
ff5167af99 | ||
|
|
62b0168cff | ||
|
|
5d87e7ee1c | ||
|
|
6330c15d2e | ||
|
|
de4f2f7373 | ||
|
|
67aba1f2ad | ||
|
|
d89b146e3d | ||
|
|
0e2a4049c2 | ||
|
|
94b62ba4d3 | ||
|
|
a3165878aa | ||
|
|
702406f87f | ||
|
|
32bd36c423 | ||
|
|
82d7c39fdb | ||
|
|
4119cc4796 | ||
|
|
9763459838 | ||
|
|
ef0c1a8930 | ||
|
|
ca57262430 | ||
|
|
83c685c28f | ||
|
|
766ff8b142 |
@@ -2,5 +2,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
packages
|
packages
|
||||||
obj
|
obj
|
||||||
|
tmp
|
||||||
Tweaks/uYou/*
|
Tweaks/uYou/*
|
||||||
!Tweaks/uYou/.gitkeep
|
!Tweaks/uYou/.gitkeep
|
||||||
@@ -26,3 +26,11 @@
|
|||||||
path = Tweaks/PSHeader
|
path = Tweaks/PSHeader
|
||||||
url = https://github.com/PoomSmart/PSHeader.git
|
url = https://github.com/PoomSmart/PSHeader.git
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "Tweaks/YTSpeed"]
|
||||||
|
path = Tweaks/YTSpeed
|
||||||
|
url = https://github.com/qnblackcat/YTSpeed.git
|
||||||
|
branch = main
|
||||||
|
[submodule "Extensions"]
|
||||||
|
path = Extensions
|
||||||
|
url = https://github.com/CokePokes/YoutubeExtensions.git
|
||||||
|
branch = main
|
||||||
|
|||||||
Submodule
+1
Submodule Extensions added at a68d70883d
@@ -0,0 +1,43 @@
|
|||||||
|
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||||
|
|
||||||
|
@interface SSOConfiguration : NSObject
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTMainAppControlsOverlayView: UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTPlaylistHeaderViewController : UIViewController
|
||||||
|
@property (nonatomic, strong, readwrite) UIView *downloadsButton;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface ASWAppSwitcherCollectionViewCell: UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||||
|
- (UIViewController *)_viewControllerForAncestor;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTWatchMiniBarView : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTPlayerViewController (YTAFS)
|
||||||
|
- (void)autoFullscreen;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface ASScrollView : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface UIKeyboardLayoutStar : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface UIKeyboardDockView : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface UICandidateViewController : UIViewController
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface UIPredictionViewController : UIViewController
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface SponsorBlockSettingsController : UITableViewController
|
||||||
|
@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
|
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 = 0
|
||||||
ARCHS = arm64
|
ARCHS = arm64
|
||||||
MODULES = jailed
|
MODULES = jailed
|
||||||
FINALPACKAGE = 1
|
FINALPACKAGE = 1
|
||||||
@@ -10,13 +12,12 @@ 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 Settings.xm
|
||||||
uYouPlus_IPA = /path/to/decrypted/YouTube/IPA
|
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
|
||||||
SUBPROJECTS += Tweaks/Alderis Tweaks/iSponsorBlock Tweaks/YTUHD Tweaks/YouPiP Tweaks/Return-YouTube-Dislikes
|
SUBPROJECTS += Tweaks/Alderis Tweaks/iSponsorBlock Tweaks/YTUHD Tweaks/YouPiP Tweaks/Return-YouTube-Dislikes Tweaks/YTSpeed
|
||||||
include $(THEOS_MAKE_PATH)/aggregate.mk
|
include $(THEOS_MAKE_PATH)/aggregate.mk
|
||||||
|
|
||||||
before-package::
|
before-package::
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
# Table of Contents
|
# Table of Contents
|
||||||
|
|
||||||
* [Credits](#credits)
|
* [Credits](#credits)
|
||||||
@@ -10,28 +9,28 @@
|
|||||||
* [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
|
||||||
|
|
||||||
- [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) and [BigYTMiniPlayer](https://github.com/Galactic-Dev/BigYTMiniPlayer).
|
||||||
|
|
||||||
- [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: [NoYTPremium](https://github.com/PoomSmart/NoYTPremium/), [YouRememberCaption](https://www.ios-repo-updates.com/repository/poomsmart/package/com.ps.youremembercaption/), [YTClassicVideoQuality](https://poomsmart.github.io/repo/depictions/ytclassicvideoquality.html), [YTNoCheckLocalNetwork](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html), [YTSystemAppearance](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html), [YTAutoFullScreen](https://github.com/PoomSmart/YTAutoFullScreen/), [YTReExplore](https://github.com/PoomSmart/YTReExplore/), [IAmYouTube](https://github.com/PoomSmart/IAmYouTube), [YTUHD](https://poomsmart.github.io/repo/depictions/ytuhd.html), [YouPiP](https://poomsmart.github.io/repo/depictions/youpip.html), and [Return YouTube Dislike](https://github.com/PoomSmart/Return-YouTube-Dislikes)
|
||||||
|
|
||||||
- [level3tjg](https://twitter.com/level3tjg?s=21) - 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/)
|
||||||
|
|
||||||
|
- [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!
|
||||||
@@ -43,17 +42,26 @@
|
|||||||
4. **YTUHD:** unlock VP9 codec and in effect, enables video quality of 2K and 4K. You can enable/disable YTUHD in YouTube Settings - Video quality preferences.
|
4. **YTUHD:** unlock VP9 codec and in effect, enables video quality of 2K and 4K. You can enable/disable YTUHD in YouTube Settings - Video quality preferences.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>And more...!</summary>
|
<summary>And many more...!</summary>
|
||||||
|
|
||||||
5. **YTClassicVideoQuality:** since YouTube v16.xx, you need one more step to change the video quality. YTClassicVideoQuality brings back the old video quality selector, which is a lot better than the new one.
|
5. **YTAutoFullScreen:** autoplay videos at full screen.
|
||||||
|
|
||||||
6. **YTNoHoverCards:** offer an option to enable/disable the annoying suggested videos show up at the end of the videos.
|
6. **YTClassicVideoQuality:** since YouTube v16.xx, you need one more step to change the video quality. YTClassicVideoQuality brings back the old video quality selector, which is a lot better than the new one.
|
||||||
|
|
||||||
7. **YTSystemAppearance**: sync the YouTube theme (dark/light) with the system theme.
|
7. **YTNoHoverCards:** offer an option to enable/disable the annoying suggested videos show up at the end of the videos.
|
||||||
|
|
||||||
8. **YTNoCheckLocalNetwork**: block the Local Network permission popup.
|
8. **YTSystemAppearance**: sync the YouTube theme (dark/light) with the system theme.
|
||||||
|
|
||||||
|
9. **YTNoCheckLocalNetwork**: block the Local Network permission popup.
|
||||||
|
|
||||||
|
10. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
9. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
# Known issues
|
# Known issues
|
||||||
@@ -62,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).
|
||||||
@@ -71,27 +78,36 @@
|
|||||||
|
|
||||||
- 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.21.3-2.1)](https://tinyurl.com/52j8xeee) - It will take a while to install because AltStore needs to download the IPA.
|
||||||
|
|
||||||
- Version info: _(last update: Apr 01)_
|
- Version info: _(last update: June 01)_
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> Expand</summary>
|
<summary> ▶︎ Expand</summary>
|
||||||
|
|
||||||
| **Tweaks/App** | **Version** | **Open source** |
|
| **Tweaks/App** | **Version** | **Open source** |
|
||||||
| :------------: | :----------:| :-------------: |
|
| :------------: | :----------:| :-------------: |
|
||||||
| **YouTube** | 17.12.5 | ✖︎ |
|
| **YouTube** | 17.21.3 | ✖︎ |
|
||||||
| **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.2| [✔︎](https://github.com/hbang/Alderis) |
|
||||||
| **YouRememberCaption** | 1.0.0 | [✔︎](https://www.ios-repo-updates.com/repository/poomsmart/package/com.ps.youremembercaption/) |
|
| **NoYTPremium** | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium/) |
|
||||||
|
| **YouRememberCaption** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) |
|
||||||
| **YTClassicVideoQuality** | 1.0.1 | [✔︎](https://github.com/PoomSmart/YTClassicVideoQuality) |
|
| **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.6 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
| **YTUHD** | 1.2.7 | [✔︎](https://github.com/PoomSmart/YTUHD) |
|
||||||
| **YouPiP** | 1.6.9 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
| **YouPiP** | 1.7.0 | [✔︎](https://github.com/PoomSmart/YouPiP) |
|
||||||
|
| **IAmYouTube** | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) |
|
||||||
|
| **YTSpeed** | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
|
||||||
|
| **YTAutoFullScreen** | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen/) |
|
||||||
|
| **YTReExplore** | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
|
||||||
|
| **BigYTMiniPlayer** | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
|
||||||
|
| **YTCastConfirm** | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) |
|
||||||
|
| **YTMiniplayerEnabler** | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -101,7 +117,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
|
||||||
|
|
||||||
@@ -109,25 +125,20 @@ 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
|
||||||
|
|
||||||
- Venmo: https://venmo.com/u/DavidBrett
|
- Venmo: https://venmo.com/u/DavidBrett
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Lillie</summary>
|
|
||||||
|
|
||||||
- Patreon: https://patreon.com/lillieweeb
|
|
||||||
</details>
|
|
||||||
|
|
||||||
# FAQ
|
# FAQ
|
||||||
|
|
||||||
|
|||||||
+159
@@ -0,0 +1,159 @@
|
|||||||
|
#import "Tweaks/YouTubeHeader/YTSettingsViewController.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 oled();
|
||||||
|
extern BOOL oledKB();
|
||||||
|
extern BOOL autoFullScreen();
|
||||||
|
extern BOOL noHoverCard();
|
||||||
|
extern BOOL ReExplore();
|
||||||
|
extern BOOL bigYTMiniPlayer();
|
||||||
|
extern BOOL hideCC();
|
||||||
|
extern BOOL hideAutoplaySwitch();
|
||||||
|
extern BOOL castConfirm();
|
||||||
|
extern BOOL ytMiniPlayer();
|
||||||
|
extern BOOL hidePreviousAndNextButton();
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
%hook YTAppSettingsPresentationData
|
||||||
|
+ (NSArray *)settingsCategoryOrder {
|
||||||
|
NSArray *order = %orig;
|
||||||
|
NSMutableArray *mutableOrder = [order mutableCopy];
|
||||||
|
NSUInteger insertIndex = [order indexOfObject:@(1)];
|
||||||
|
if (insertIndex != NSNotFound)
|
||||||
|
[mutableOrder insertObject:@(uYouPlusSection) atIndex:insertIndex + 1];
|
||||||
|
return mutableOrder;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTSettingsSectionItemManager
|
||||||
|
%new - (void)updateuYouPlusSectionWithEntry:(id)entry {
|
||||||
|
YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"];
|
||||||
|
|
||||||
|
YTSettingsSectionItem *hidePreviousAndNextButton = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Previous and Next button" titleDescription:@"Hide Previous and Next button in video controls overlay."];
|
||||||
|
hidePreviousAndNextButton.hasSwitch = YES;
|
||||||
|
hidePreviousAndNextButton.switchVisible = YES;
|
||||||
|
hidePreviousAndNextButton.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePreviousAndNextButton_enabled"];
|
||||||
|
hidePreviousAndNextButton.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hidePreviousAndNextButton_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
|
||||||
|
YTSettingsSectionItem *ytMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Enable the Miniplayer for all YouTube videos" titleDescription:@"Kid videos for example."];
|
||||||
|
ytMiniPlayer.hasSwitch = YES;
|
||||||
|
ytMiniPlayer.switchVisible = YES;
|
||||||
|
ytMiniPlayer.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"];
|
||||||
|
ytMiniPlayer.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"ytMiniPlayer_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."];
|
||||||
|
castConfirm.hasSwitch = YES;
|
||||||
|
castConfirm.switchVisible = YES;
|
||||||
|
castConfirm.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
||||||
|
castConfirm.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"castConfirm_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;
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
YTSettingsSectionItem *bigYTMiniPlayer = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"New miniplayer bar style (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;
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
YTSettingsSectionItem *hideCC = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Subtitles button" titleDescription:@"Hide the Subtitles button in video controls overlay. "];
|
||||||
|
hideCC.hasSwitch = YES;
|
||||||
|
hideCC.switchVisible = YES;
|
||||||
|
hideCC.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideCC_enabled"];
|
||||||
|
hideCC.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideCC_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
|
||||||
|
YTSettingsSectionItem *hideAutoplaySwitch = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide Autoplay switch" titleDescription:@"Hide the Autoplay switch button in video controls overlay."];
|
||||||
|
hideAutoplaySwitch.hasSwitch = YES;
|
||||||
|
hideAutoplaySwitch.switchVisible = YES;
|
||||||
|
hideAutoplaySwitch.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideAutoplaySwitch_enabled"];
|
||||||
|
hideAutoplaySwitch.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideAutoplaySwitch_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;
|
||||||
|
autoFull.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
||||||
|
autoFull.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"autofull_enabled"];
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
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, hidePreviousAndNextButton, 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
|
||||||
+1
-1
Submodule Tweaks/Alderis updated: f8b577ebf7...2c4304d844
+1
-1
Submodule Tweaks/PSHeader updated: 7f13c9adf9...ac9324f441
Submodule
+1
Submodule Tweaks/YTSpeed added at 7c11d9c916
+1
-1
Submodule Tweaks/YTUHD updated: ea6d7eb8bc...00c5e38ca9
+1
-1
Submodule Tweaks/YouPiP updated: 23fc13e5e2...66cae4c924
+1
-1
Submodule Tweaks/YouTubeHeader updated: ca786bc9b6...81125ef7b5
+1
-1
Submodule Tweaks/iSponsorBlock updated: a026656096...a936217c38
+25
-10
@@ -4,34 +4,49 @@
|
|||||||
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
|
||||||
read -e -p "==> Path to the decrypted YouTube iPA: " PATHTOIPA
|
if [ -d ./tmp ]
|
||||||
if [[ $PATHTOIPA == *.ipa ]]
|
|
||||||
then
|
then
|
||||||
sed -i '' "14s#.*#uYouPlus_IPA = $PATHTOIPA#g" ./Makefile
|
rm -rf ./tmp
|
||||||
|
fi
|
||||||
|
read -e -p "==> Path to the decrypted YouTube.ipa or YouTube.app: " PATHTOYT
|
||||||
|
if [[ $PATHTOYT == *.ipa ]]
|
||||||
|
then
|
||||||
|
unzip -q "$PATHTOYT" -d ./tmp
|
||||||
|
rm -rf ./tmp/Payload/YouTube.app/PlugIns/*.appex
|
||||||
|
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
|
||||||
|
make package
|
||||||
|
open ./packages
|
||||||
|
|
||||||
|
elif [[ $PATHTOYT == *.app ]]
|
||||||
|
then
|
||||||
|
mkdir -p ./tmp/Payload/
|
||||||
|
cp -R "$PATHTOYT" ./tmp/Payload 2>/dev/null
|
||||||
|
rm -rf ./tmp/Payload/YouTube.app/PlugIns/*.appex
|
||||||
|
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
|
||||||
make package
|
make package
|
||||||
open ./packages
|
open ./packages
|
||||||
else
|
else
|
||||||
echo "This is not an iPA"
|
echo "This is not an ipa/app!"
|
||||||
fi
|
fi
|
||||||
# Clean up
|
# Clean up
|
||||||
tput setaf 1 && echo -e "==> \033[1mCleaning up...\033[0m"
|
tput setaf 1 && echo -e "==> \033[1mCleaning up...\033[0m"
|
||||||
find Tweaks/uYou -mindepth 1 ! -name "com.miro.uyou_2.1_iphoneos-arm.deb" ! -name ".gitkeep" -exec rm -rf {} \; 2>/dev/null
|
find Tweaks/uYou -mindepth 1 ! -name "com.miro.uyou_2.1_iphoneos-arm.deb" ! -name ".gitkeep" -exec rm -rf {} \; 2>/dev/null
|
||||||
rm -rf Resources .theos/_/Payload
|
rm -rf tmp/ Resources .theos/_/Payload
|
||||||
-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
|
|
||||||
+615
@@ -0,0 +1,615 @@
|
|||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <objc/runtime.h>
|
||||||
|
#import <dlfcn.h>
|
||||||
|
#import "Header.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||||
|
#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"
|
||||||
|
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
|
||||||
|
|
||||||
|
#define YT_BUNDLE_ID @"com.google.ios.youtube"
|
||||||
|
#define YT_NAME @"YouTube"
|
||||||
|
|
||||||
|
BOOL hideHUD() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
|
}
|
||||||
|
BOOL oled() {
|
||||||
|
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() {
|
||||||
|
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"];
|
||||||
|
}
|
||||||
|
BOOL hideCC() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideCC_enabled"];
|
||||||
|
}
|
||||||
|
BOOL hideAutoplaySwitch() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideAutoplaySwitch_enabled"];
|
||||||
|
}
|
||||||
|
BOOL hidePreviousAndNextButton() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePreviousAndNextButton_enabled"];
|
||||||
|
}
|
||||||
|
BOOL castConfirm() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
||||||
|
}
|
||||||
|
BOOL ytMiniPlayer() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tweaks
|
||||||
|
// YTMiniPlayerEnabler: https://github.com/level3tjg/YTMiniplayerEnabler/
|
||||||
|
%hook YTWatchMiniBarViewController
|
||||||
|
- (void)updateMiniBarPlayerStateFromRenderer {
|
||||||
|
if (ytMiniPlayer()) {}
|
||||||
|
else { return %orig; }
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Hide CC / Autoplay switch
|
||||||
|
%hook YTMainAppControlsOverlayView
|
||||||
|
- (void)setClosedCaptionsOrSubtitlesButtonAvailable:(BOOL)arg1 { // hide CC?!
|
||||||
|
if (hideCC()) { return %orig(NO); }
|
||||||
|
else { return %orig; }
|
||||||
|
}
|
||||||
|
- (void)setAutoplaySwitchButtonRenderer:(id)arg1 {
|
||||||
|
if (hideAutoplaySwitch()) {}
|
||||||
|
else { return %orig; }
|
||||||
|
}
|
||||||
|
- (void)layoutSubviews {
|
||||||
|
if (hidePreviousAndNextButton()) {
|
||||||
|
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
|
||||||
|
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Hide HUD Messages
|
||||||
|
%hook YTHUDMessageView
|
||||||
|
- (id)initWithMessage:(id)arg1 dismissHandler:(id)arg2 {
|
||||||
|
return hideHUD() ? nil : %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTAutoFullScreen: https://github.com/PoomSmart/YTAutoFullScreen/
|
||||||
|
%hook YTPlayerViewController
|
||||||
|
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
||||||
|
%orig;
|
||||||
|
if (autoFullScreen())
|
||||||
|
[NSTimer scheduledTimerWithTimeInterval:0.75 target:self selector:@selector(autoFullscreen) userInfo:nil repeats:NO];
|
||||||
|
}
|
||||||
|
%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
|
||||||
|
|
||||||
|
//YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm
|
||||||
|
%hook MDXPlaybackRouteButtonController
|
||||||
|
- (void)didPressButton:(id)arg1 {
|
||||||
|
if (castConfirm()) {
|
||||||
|
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting"
|
||||||
|
message:@"Are you sure you want to start casting?"
|
||||||
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||||
|
%orig;
|
||||||
|
}];
|
||||||
|
|
||||||
|
UIAlertAction* noButton = [%c(UIAlertAction)
|
||||||
|
actionWithTitle:@"Cancel"
|
||||||
|
style:UIAlertActionStyleDefault
|
||||||
|
handler: ^(UIAlertAction * action) {
|
||||||
|
return;
|
||||||
|
}];
|
||||||
|
|
||||||
|
[alertController addAction:defaultAction];
|
||||||
|
[alertController addAction:noButton];
|
||||||
|
|
||||||
|
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
|
||||||
|
if ([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
|
||||||
|
rootViewController = ((UINavigationController *)rootViewController).viewControllers.firstObject;
|
||||||
|
}
|
||||||
|
if ([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
|
||||||
|
rootViewController = ((UITabBarController *)rootViewController).selectedViewController;
|
||||||
|
}
|
||||||
|
if ([rootViewController presentedViewController] != nil) {
|
||||||
|
rootViewController = [rootViewController presentedViewController];
|
||||||
|
}
|
||||||
|
[rootViewController presentViewController:alertController animated:YES completion:nil];
|
||||||
|
} else { return %orig; }
|
||||||
|
|
||||||
|
}
|
||||||
|
%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; }
|
||||||
|
- (BOOL)isEnhancedSearchBarEnabled { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
// NOYTPremium - https://github.com/PoomSmart/NoYTPremium/
|
||||||
|
%hook YTCommerceEventGroupHandler
|
||||||
|
- (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
|
||||||
|
|
||||||
|
// IAmYouTube - https://github.com/PoomSmart/IAmYouTube/
|
||||||
|
%hook YTVersionUtils
|
||||||
|
+ (NSString *)appName { return YT_NAME; }
|
||||||
|
+ (NSString *)appID { return YT_BUNDLE_ID; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook GCKBUtils
|
||||||
|
+ (NSString *)appIdentifier { return YT_BUNDLE_ID; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook GPCDeviceInfo
|
||||||
|
+ (NSString *)bundleId { return YT_BUNDLE_ID; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook OGLBundle
|
||||||
|
+ (NSString *)shortAppName { return YT_NAME; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook GVROverlayView
|
||||||
|
+ (NSString *)appName { return YT_NAME; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook OGLPhenotypeFlagServiceImpl
|
||||||
|
- (NSString *)bundleId { return YT_BUNDLE_ID; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook SSOConfiguration
|
||||||
|
- (id)initWithClientID:(id)clientID supportedAccountServices:(id)supportedAccountServices {
|
||||||
|
self = %orig;
|
||||||
|
[self setValue:YT_NAME forKey:@"_shortAppName"];
|
||||||
|
[self setValue:YT_BUNDLE_ID forKey:@"_applicationIdentifier"];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook NSBundle
|
||||||
|
- (NSString *)bundleIdentifier {
|
||||||
|
NSArray *address = [NSThread callStackReturnAddresses];
|
||||||
|
Dl_info info = {0};
|
||||||
|
if (dladdr((void *)[address[2] longLongValue], &info) == 0)
|
||||||
|
return %orig;
|
||||||
|
NSString *path = [NSString stringWithUTF8String:info.dli_fname];
|
||||||
|
if ([path hasPrefix:NSBundle.mainBundle.bundlePath])
|
||||||
|
return YT_BUNDLE_ID;
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
- (id)objectForInfoDictionaryKey:(NSString *)key {
|
||||||
|
if ([key isEqualToString:@"CFBundleIdentifier"])
|
||||||
|
return YT_BUNDLE_ID;
|
||||||
|
if ([key isEqualToString:@"CFBundleDisplayName"] || [key isEqualToString:@"CFBundleName"])
|
||||||
|
return YT_NAME;
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Workaround for issue #54
|
||||||
|
// %hook YTMainAppVideoPlayerOverlayViewController
|
||||||
|
// - (void)updateRelatedVideos {
|
||||||
|
// if ([[NSUserDefaults standardUserDefaults] boolForKey:@"relatedVideosAtTheEndOfYTVideos"] == NO) {}
|
||||||
|
// else { return %orig; }
|
||||||
|
// }
|
||||||
|
// %end
|
||||||
|
|
||||||
|
// OLED dark mode by BandarHL
|
||||||
|
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||||
|
|
||||||
|
%group gOLED
|
||||||
|
%hook YTCommonColorPalette
|
||||||
|
- (UIColor *)brandBackgroundSolid {
|
||||||
|
if (self.pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
||||||
|
// Account view controller
|
||||||
|
%hook YTAccountPanelBodyViewController
|
||||||
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
|
if (pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTInnerTubeCollectionViewController
|
||||||
|
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||||
|
if (pageStyle == 1) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Explore
|
||||||
|
%hook ASScrollView
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
self.backgroundColor = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// uYou's page
|
||||||
|
%hook DownloadedVC
|
||||||
|
- (UIColor *)ytBackgroundColor {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook DownloadsPagerVC
|
||||||
|
- (UIColor *)ytBackgroundColor {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook DownloadingVC
|
||||||
|
- (UIColor *)ytBackgroundColor {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook PlayerVC
|
||||||
|
- (UIColor *)ytBackgroundColor {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return oledColor;
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// SponsorBlock settings
|
||||||
|
%hook SponsorBlockSettingsController
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
|
%orig;
|
||||||
|
self.tableView.backgroundColor = oledColor;
|
||||||
|
} else { return %orig; }
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YT player
|
||||||
|
%hook YTWatchMiniBarView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig([UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9]);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Search View
|
||||||
|
%hook YTSearchBarView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTSearchBoxView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Comment view
|
||||||
|
%hook YTCreateCommentAccessoryView // community reply comment
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTCreateCommentTextView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
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
|
||||||
|
|
||||||
|
%hook YTFormattedStringLabel // YT is werid...
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig ([UIColor clearColor]);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YCHLiveChatActionPanelView // live chat comment
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTEmojiTextView // live chat comment
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Separation lines
|
||||||
|
%hook YTCollectionSeparatorView
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
if (isDarkMode()) {}
|
||||||
|
else { return %orig; }
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Open link with...
|
||||||
|
%hook ASWAppSwitchingSheetHeaderView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook ASWAppSwitchingSheetFooterView
|
||||||
|
- (void)setBackgroundColor:(UIColor *)color {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
return %orig (oledColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook ASWAppSwitcherCollectionViewCell
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
if (isDarkMode()) {
|
||||||
|
self.subviews[1].backgroundColor = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
|
%group gOLEDKB // OLED keyboard by @ichitaso <3 - http://gist.github.com/ichitaso/935100fd53a26f18a9060f7195a1be0e
|
||||||
|
%hook UIPredictionViewController
|
||||||
|
- (void)loadView {
|
||||||
|
%orig;
|
||||||
|
[self.view setBackgroundColor:oledColor];
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UICandidateViewController
|
||||||
|
- (void)loadView {
|
||||||
|
%orig;
|
||||||
|
[self.view setBackgroundColor:oledColor];
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIKeyboardDockView
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
self.backgroundColor = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIKeyboardLayoutStar
|
||||||
|
- (void)didMoveToWindow {
|
||||||
|
self.backgroundColor = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook UIKBRenderConfig // Prediction text color
|
||||||
|
- (void)setLightKeyboard:(BOOL)arg1 { %orig(NO); }
|
||||||
|
%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 (oledKB()) {
|
||||||
|
%init(gOLEDKB);
|
||||||
|
}
|
||||||
|
if (ReExplore()) {
|
||||||
|
%init(gReExplore);
|
||||||
|
}
|
||||||
|
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
||||||
|
%init(Main);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user