Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff5167af99 | ||
|
|
62b0168cff | ||
|
|
5d87e7ee1c | ||
|
|
6330c15d2e | ||
|
|
de4f2f7373 | ||
|
|
67aba1f2ad | ||
|
|
d89b146e3d |
@@ -0,0 +1,27 @@
|
|||||||
|
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||||
|
|
||||||
|
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||||
|
-(UIViewController *)_viewControllerForAncestor;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTWatchMiniBarView : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTAsyncCollectionView : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTPlayerViewController (YTAFS)
|
||||||
|
- (void)autoFullscreen;
|
||||||
|
@end
|
||||||
|
|
||||||
|
//@interface ASCollectionView : UIView
|
||||||
|
//@end
|
||||||
|
|
||||||
|
@interface YTLightweightQTMButton : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface YTELMView : UIView
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface NIAttributedLabel : UIView
|
||||||
|
@end
|
||||||
@@ -10,8 +10,8 @@ TWEAK_NAME = uYouPlus
|
|||||||
DISPLAY_NAME = YouTube
|
DISPLAY_NAME = YouTube
|
||||||
BUNDLE_ID = com.google.ios.youtube
|
BUNDLE_ID = com.google.ios.youtube
|
||||||
|
|
||||||
uYouPlus_FILES = uYouPlus.xm
|
uYouPlus_FILES = uYouPlus.xm Settings.xm
|
||||||
uYouPlus_IPA = /path/to/decrypted/YouTube/IPA
|
uYouPlus_IPA = /path/to/your/decrypted/YouTube/IPA
|
||||||
### Important: edit the path to your decrypted YouTube IPA!!!
|
### Important: edit the path to your decrypted YouTube IPA!!!
|
||||||
|
|
||||||
include $(THEOS)/makefiles/common.mk
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|||||||
@@ -76,16 +76,16 @@
|
|||||||
|
|
||||||
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
|
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/
|
||||||
|
|
||||||
- [Open in AltStore (v17.15.1-2.1)](https://tinyurl.com/bdd57rer) - It will take a while to install because AltStore needs to download the IPA.
|
- [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.
|
||||||
|
|
||||||
- Version info: _(last update: Apr 19)_
|
- Version info: _(last update: Apr 25)_
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> Expand</summary>
|
<summary> Expand</summary>
|
||||||
|
|
||||||
| **Tweaks/App** | **Version** | **Open source** |
|
| **Tweaks/App** | **Version** | **Open source** |
|
||||||
| :------------: | :----------:| :-------------: |
|
| :------------: | :----------:| :-------------: |
|
||||||
| **YouTube** | 17.15.1 | ✖︎ |
|
| **YouTube** | 17.16.4 | ✖︎ |
|
||||||
| **uYou** | 2.1 | ✖︎ |
|
| **uYou** | 2.1 | ✖︎ |
|
||||||
| **Return YouTube Dislike** | 1.6.4 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
|
| **Return YouTube Dislike** | 1.6.4 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
|
||||||
| **iSponsorBlock** | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
| **iSponsorBlock** | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
|
||||||
@@ -95,12 +95,13 @@
|
|||||||
| **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.6.11 | [✔︎](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) |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
||||||
|
|
||||||
|
extern BOOL hideHUD();
|
||||||
|
extern BOOL oled();
|
||||||
|
extern BOOL autoFullScreen();
|
||||||
|
extern BOOL noHoverCard();
|
||||||
|
extern BOOL ReExplore();
|
||||||
|
extern BOOL bigYTMiniPlayer();
|
||||||
|
extern BOOL hideCC();
|
||||||
|
extern BOOL hideAutoplaySwitch();
|
||||||
|
extern BOOL castConfirm();
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
%hook YTSettingsViewController
|
||||||
|
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *>*)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
|
||||||
|
if (category == 1) {
|
||||||
|
NSUInteger statsForNerdsIndex = [sectionItems indexOfObjectPassingTest:^BOOL (YTSettingsSectionItem *item, NSUInteger idx, BOOL *stop) {
|
||||||
|
return item.settingItemId == 265;
|
||||||
|
}];
|
||||||
|
if (statsForNerdsIndex != NSNotFound) {
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *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;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:castConfirm atIndex:statsForNerdsIndex + 1];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *hoverCardItem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Show End screens hover cards (YTNoHoverCards)" titleDescription:@"Allows creator End screens (thumbnails) to appear at the end of videos."];
|
||||||
|
hoverCardItem.hasSwitch = YES;
|
||||||
|
hoverCardItem.switchVisible = YES;
|
||||||
|
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
||||||
|
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:hoverCardItem atIndex:statsForNerdsIndex + 1];
|
||||||
|
//
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:bigYTMiniPlayer atIndex:statsForNerdsIndex + 2];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
||||||
|
reExplore.hasSwitch = YES;
|
||||||
|
reExplore.switchVisible = YES;
|
||||||
|
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
||||||
|
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:reExplore atIndex:statsForNerdsIndex + 2];
|
||||||
|
//
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:hideCC atIndex:statsForNerdsIndex + 1];
|
||||||
|
//
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:hideAutoplaySwitch atIndex:statsForNerdsIndex + 1];
|
||||||
|
//
|
||||||
|
YTSettingsSectionItem *autoFUll = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Auto Full Screen (YTAutoFullScreen)" titleDescription:@"Autoplay videos at full screen."];
|
||||||
|
autoFUll.hasSwitch = YES;
|
||||||
|
autoFUll.switchVisible = YES;
|
||||||
|
autoFUll.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
||||||
|
autoFUll.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"autofull_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:autoFUll atIndex:statsForNerdsIndex + 3];
|
||||||
|
//
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
[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."];
|
||||||
|
Oleditem.hasSwitch = YES;
|
||||||
|
Oleditem.switchVisible = YES;
|
||||||
|
Oleditem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
||||||
|
Oleditem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
||||||
|
return YES;
|
||||||
|
};
|
||||||
|
[sectionItems insertObject:Oleditem atIndex:statsForNerdsIndex + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
+1
-1
Submodule Tweaks/YouPiP updated: 23fc13e5e2...faaaf09ec1
+1
-1
Submodule Tweaks/YouTubeHeader updated: 5d11e98158...71372d2c48
+70
-105
@@ -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 "Header.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
|
||||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||||
@@ -12,27 +13,6 @@
|
|||||||
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
|
||||||
#include <RemoteLog.h>
|
#include <RemoteLog.h>
|
||||||
|
|
||||||
@interface YTMainAppVideoPlayerOverlayView : UIView
|
|
||||||
-(UIViewController *)_viewControllerForAncestor;
|
|
||||||
@end
|
|
||||||
@interface YTWatchMiniBarView : UIView
|
|
||||||
@end
|
|
||||||
@interface YTAsyncCollectionView : UIView
|
|
||||||
@end
|
|
||||||
@interface YTPlayerViewController (YTAFS)
|
|
||||||
- (void)autoFullscreen;
|
|
||||||
@end
|
|
||||||
@interface ASCollectionView : UIView
|
|
||||||
@end
|
|
||||||
@interface YTLightweightQTMButton : UIView
|
|
||||||
@end
|
|
||||||
@interface YTELMView : UIView
|
|
||||||
@end
|
|
||||||
@interface NIAttributedLabel : UIView
|
|
||||||
@end
|
|
||||||
|
|
||||||
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
|
||||||
|
|
||||||
BOOL hideHUD() {
|
BOOL hideHUD() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
}
|
}
|
||||||
@@ -51,89 +31,37 @@ BOOL ReExplore() {
|
|||||||
BOOL bigYTMiniPlayer() {
|
BOOL bigYTMiniPlayer() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"bigYTMiniPlayer_enabled"];
|
||||||
}
|
}
|
||||||
|
BOOL hideCC() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideCC_enabled"];
|
||||||
|
}
|
||||||
|
BOOL hideAutoplaySwitch() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideAutoplaySwitch_enabled"];
|
||||||
|
}
|
||||||
|
BOOL castConfirm() {
|
||||||
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"castConfirm_enabled"];
|
||||||
|
}
|
||||||
|
|
||||||
//Settings
|
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
|
||||||
%hook YTSettingsViewController
|
|
||||||
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *>*)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
|
// Hide CC / Autoplay switch
|
||||||
if (category == 1) {
|
%hook YTMainAppControlsOverlayView
|
||||||
NSUInteger statsForNerdsIndex = [sectionItems indexOfObjectPassingTest:^BOOL (YTSettingsSectionItem *item, NSUInteger idx, BOOL *stop) {
|
- (void)layoutSubviews {
|
||||||
return item.settingItemId == 265;
|
%orig();
|
||||||
}];
|
if (hideAutoplaySwitch()) {
|
||||||
if (statsForNerdsIndex != NSNotFound) {
|
MSHookIvar<UIView *>(self, "_autonavSwitch").hidden = 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."];
|
if (hideCC()) {
|
||||||
hoverCardItem.hasSwitch = YES;
|
MSHookIvar<UIView *>(self, "_closedCaptionsOrSubtitlesButton").hidden = YES;
|
||||||
hoverCardItem.switchVisible = YES;
|
}
|
||||||
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
|
}
|
||||||
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
|
|
||||||
return YES;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:hoverCardItem atIndex:statsForNerdsIndex + 1];
|
|
||||||
//
|
|
||||||
YTSettingsSectionItem *reExplore = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Replace Shorts tab with Explore tab (YTReExplore)" titleDescription:@"App restart is required."];
|
|
||||||
reExplore.hasSwitch = YES;
|
|
||||||
reExplore.switchVisible = YES;
|
|
||||||
reExplore.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"reExplore_enabled"];
|
|
||||||
reExplore.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"];
|
|
||||||
return YES;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:reExplore atIndex:statsForNerdsIndex + 2];
|
|
||||||
//
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:bigYTMiniPlayer atIndex:statsForNerdsIndex + 2];
|
|
||||||
//
|
|
||||||
YTSettingsSectionItem *hideHUD = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Hide HUD Messages" titleDescription:@"Example: CC is turned on/off, Video loop is on,... App restart is required."];
|
|
||||||
hideHUD.hasSwitch = YES;
|
|
||||||
hideHUD.switchVisible = YES;
|
|
||||||
hideHUD.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
|
||||||
hideHUD.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHUD_enabled"];
|
|
||||||
return YES;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:hideHUD atIndex:statsForNerdsIndex + 1];
|
|
||||||
//
|
|
||||||
YTSettingsSectionItem *autoFUll = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Auto Full Screen (YTAutoFullScreen)" titleDescription:@"Autoplay videos at full screen."];
|
|
||||||
autoFUll.hasSwitch = YES;
|
|
||||||
autoFUll.switchVisible = YES;
|
|
||||||
autoFUll.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"autofull_enabled"];
|
|
||||||
autoFUll.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"autofull_enabled"];
|
|
||||||
return YES;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:autoFUll atIndex:statsForNerdsIndex + 2];
|
|
||||||
//
|
|
||||||
YTSettingsSectionItem *Oleditem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"OLED Dark mode (Experimental)" titleDescription:@"WARNING: You must set YouTube's appearance to Dark theme before enabling OLED dark mode (iPad is not supported). App restart is required."];
|
|
||||||
Oleditem.hasSwitch = YES;
|
|
||||||
Oleditem.switchVisible = YES;
|
|
||||||
Oleditem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"oled_enabled"];
|
|
||||||
Oleditem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"oled_enabled"];
|
|
||||||
return YES;
|
|
||||||
};
|
|
||||||
[sectionItems insertObject:Oleditem atIndex:statsForNerdsIndex + 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%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()) {
|
if (hideHUD()) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
} else { return %orig; }
|
||||||
else
|
|
||||||
return %orig;
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
@@ -160,6 +88,42 @@ BOOL bigYTMiniPlayer() {
|
|||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
%end
|
%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
|
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/12
|
||||||
%hook YTAdsInnerTubeContextDecorator
|
%hook YTAdsInnerTubeContextDecorator
|
||||||
@@ -454,13 +418,6 @@ BOOL bigYTMiniPlayer() {
|
|||||||
- (void)layoutSubviews {}
|
- (void)layoutSubviews {}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook ASCollectionView
|
|
||||||
-(void)layoutSubviews {
|
|
||||||
self.backgroundColor = oledColor;
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTLightweightQTMButton
|
%hook YTLightweightQTMButton
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
if([self.nextResponder isKindOfClass:%c(YTShareMainView)]) {
|
if([self.nextResponder isKindOfClass:%c(YTShareMainView)]) {
|
||||||
@@ -514,6 +471,7 @@ BOOL bigYTMiniPlayer() {
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
////
|
||||||
/*
|
/*
|
||||||
%hook YTShortsGalleryHeaderView // upload videos heaer (gallery)
|
%hook YTShortsGalleryHeaderView // upload videos heaer (gallery)
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
@@ -529,6 +487,13 @@ BOOL bigYTMiniPlayer() {
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook ASCollectionView
|
||||||
|
-(void)layoutSubviews {
|
||||||
|
self.backgroundColor = oledColor;
|
||||||
|
%orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
%hook YTChannelProfileDescriptionEditorView // edit profile Description
|
%hook YTChannelProfileDescriptionEditorView // edit profile Description
|
||||||
-(void)setBackgroundColor:(id)arg1 {
|
-(void)setBackgroundColor:(id)arg1 {
|
||||||
arg1 = oledColor;
|
arg1 = oledColor;
|
||||||
@@ -620,7 +585,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
%init;
|
%init;
|
||||||
if (oled()) {
|
if (oled() && ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1)) {
|
||||||
%init(gOLED);
|
%init(gOLED);
|
||||||
}
|
}
|
||||||
if (ReExplore()) {
|
if (ReExplore()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user