diff --git a/Header.h b/Header.h index 4a0e631..e3d4fe7 100644 --- a/Header.h +++ b/Header.h @@ -1,5 +1,6 @@ #import "Tweaks/YouTubeHeader/YTAppDelegate.h" #import "Tweaks/YouTubeHeader/YTPlayerViewController.h" +#import "Tweaks/YouTubeHeader/YTQTMButton.h" #define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil] #define YT_BUNDLE_ID @"com.google.ios.youtube" @@ -40,6 +41,9 @@ @interface boolSettingsVC : UIViewController @end +@interface YTPlaybackButton : UIControl +@end + @interface PlayerManager : NSObject - (float)progress; @end @@ -52,6 +56,12 @@ @property UIButton *downloadsButton; @end +// Buttons +@interface YTRightNavigationButtons : UIView +@property YTQTMButton *notificationButton; +@property YTQTMButton *sponsorBlockButton; +@end + // DontEatMyContent BOOL DEMC_deviceIsSupported(); void DEMC_activate(); diff --git a/Makefile b/Makefile index 2cad866..b29a119 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ TARGET = iphone:clang:15.5:14.0 +uYouPlus_USE_FLEX = 0 uYouPlus_USE_FISHHOOK = 0 ARCHS = arm64 MODULES = jailed @@ -12,7 +13,7 @@ BUNDLE_ID = com.google.ios.youtube EXTRA_CFLAGS := $(addprefix -I,$(shell find Tweaks/FLEX -name '*.h' -exec dirname {} \;)) -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/YTABConfig.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/YTABConfig.dylib .theos/obj/YouMute.dylib uYouPlus_FILES = uYouPlus.xm Settings.xm $(shell find Tweaks/FLEX -type f \( -iname \*.c -o -iname \*.m -o -iname \*.mm \)) uYouPlus_IPA = tmp/Payload/YouTube.app uYouPlus_FRAMEWORKS = UIKit Security @@ -20,7 +21,7 @@ uYouPlus_CFLAGS = -fobjc-arc -Wno-deprecated-declarations -Wno-unsupported-avail include $(THEOS)/makefiles/common.mk include $(THEOS_MAKE_PATH)/tweak.mk -SUBPROJECTS += Tweaks/Alderis Tweaks/iSponsorBlock Tweaks/YTUHD Tweaks/YouPiP Tweaks/Return-YouTube-Dislikes Tweaks/YTABConfig +SUBPROJECTS += Tweaks/Alderis Tweaks/iSponsorBlock Tweaks/YTUHD Tweaks/YouPiP Tweaks/Return-YouTube-Dislikes Tweaks/YTABConfig Tweaks/YouMute include $(THEOS_MAKE_PATH)/aggregate.mk before-package:: @@ -30,6 +31,7 @@ before-package:: @cp -R Tweaks/YTUHD/layout/Library/Application\ Support/YTUHD.bundle Resources/ @cp -R Tweaks/Return-YouTube-Dislikes/layout/Library/Application\ Support/RYD.bundle Resources/ @cp -R Tweaks/YTABConfig/layout/Library/Application\ Support/YTABC.bundle Resources/ + @cp -R Tweaks/YouMute/layout/Library/Application\ Support/YouMute.bundle Resources/ @cp -R Tweaks/iSponsorBlock/layout/Library/Application\ Support/iSponsorBlock.bundle Resources/ @cp -R Tweaks/uYou/Library/Application\ Support/uYouBundle.bundle Resources/ @cp -R lang/uYouPlus.bundle Resources/ diff --git a/README.md b/README.md index 5bedaa5..c37787d 100644 --- a/README.md +++ b/README.md @@ -182,16 +182,16 @@ - My official AltStore repo: https://qnblackcat.github.io/AltStore/ - - [Open in AltStore (v18.08.1-2.3~1)](https://tinyurl.com/2p8jnjsh) - It will take a while to install because AltStore needs to download the IPA first. + - [Open in AltStore (v18.07.5-2.3~1)](https://tinyurl.com/4spd8jpd) - It will take a while to install because AltStore needs to download the IPA first. -- Version info: _(last update: Feb 28)_ +- Version info: _(last update: Feb 26)_
Expand ℹ️ | **Tweaks/App** | **Developer** | **Version** | **Open source** | | - | - | :-: | :-: | -| **YouTube** | Google Inc | 18.08.1 | ✖︎ | +| **YouTube** | Google Inc | 18.07.5 | ✖︎ | | [uYou](https://github.com/MiRO92/uYou-for-YouTube) | [MiRO92](https://twitter.com/miro92) | 2.3~1 | ✖︎ | | **Open in YouTube** | [CokePokes](https://github.com/CokePokes) | 1.2 | [✔︎](https://github.com/CokePokes/YoutubeExtensions) | | **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-15 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) | diff --git a/Settings.xm b/Settings.xm index a6f066c..0b8cebd 100644 --- a/Settings.xm +++ b/Settings.xm @@ -12,6 +12,9 @@ static BOOL IsEnabled(NSString *key) { static int GetSelection(NSString *key) { return [[NSUserDefaults standardUserDefaults] integerForKey:key]; } +static int colorContrastMode() { + return [[NSUserDefaults standardUserDefaults] integerForKey:@"lcmColor"]; +} static const NSInteger uYouPlusSection = 500; @interface YTSettingsSectionItemManager (uYouPlus) @@ -52,7 +55,7 @@ extern NSBundle *uYouPlusBundle(); accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { - return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/qnblackcat/uYouPlus/releases/latest"]]; + return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/arichorn/uYouPlusExtra/releases/latest"]]; }]; [sectionItems addObject:version]; @@ -98,7 +101,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - ]; + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_PLAYER_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; @@ -157,6 +160,16 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide Shadow Overlay Buttons") + titleDescription:LOC(@"Hide the Shadow Overlay on the Play/Pause, Previous & Next Buttons") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideVideoPlayerShadowOverlayButtons_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideVideoPlayerShadowOverlayButtons_enabled"]; + return YES; + } + settingItemId:0], [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON") titleDescription:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC") @@ -217,7 +230,27 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - ]; + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide Heatwaves") + titleDescription:LOC(@"Should hide the Heatwaves in the video player. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideHeatwaves_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideHeatwaves_enabled"]; + return YES; + } + settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide Dark Overlay Background") + titleDescription:LOC(@"Hide video player's dark overlay background.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideOverlayDarkBackground_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideOverlayDarkBackground_enabled"]; + return YES; + } + settingItemId:0] + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; @@ -237,6 +270,16 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide Shorts like button") + titleDescription:LOC(@"") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideShortsLikeButton_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideShortsLikeButton_enabled"]; + return YES; + } + settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_SHORTS_DISLIKE_BUTTON") titleDescription:LOC(@"HIDE_SHORTS_DISLIKE_BUTTON_DESC") accessibilityIdentifier:nil @@ -286,7 +329,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_UYOU_SHORTS_DOWNLOAD_BUTTON") titleDescription:LOC(@"HIDE_UYOU_SHORTS_DOWNLOAD_BUTTON_DESC") accessibilityIdentifier:nil @@ -296,7 +339,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"DISABLE_RESUME_TO_SHORTS") titleDescription:LOC(@"DISABLE_RESUME_TO_SHORTS_DESC") accessibilityIdentifier:nil @@ -305,13 +348,85 @@ extern NSBundle *uYouPlusBundle(); [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"disableResumeToShorts"]; return YES; } - settingItemId:0], - ]; + settingItemId:0] + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"SHORTS_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; }]; [sectionItems addObject:shortsControlOverlayGroup]; + + # pragma mark - LowContrastMode + YTSettingsSectionItem *lowContrastModeSection = [YTSettingsSectionItemClass itemWithTitle:LOC(@"Low contrast text color") + accessibilityIdentifier:nil + detailTextBlock:^NSString *() { + switch (colorContrastMode()) { + case 1: + return LOC(@"Red UI"); + case 2: + return LOC(@"Blue UI"); + case 3: + return LOC(@"Green UI"); + case 4: + return LOC(@"Yellow UI"); + case 5: + return LOC(@"Orange UI"); + case 6: + return LOC(@"Purple UI"); + case 7: + return LOC(@"Pink UI"); + case 0: + default: + return LOC(@"Default UI"); + } + } + selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + NSArray *rows = @[ + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Default UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Red UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Blue UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:2 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Green UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:3 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Yellow UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:4 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Orange UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:5 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Purple UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:6 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:LOC(@"Pink UI") titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:7 forKey:@"lcmColor"]; + [settingsViewController reloadData]; + return YES; + }] + ]; + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"Low contrast text color") pickerSectionTitle:nil rows:rows selectedItemIndex:colorContrastMode() parentResponder:[self parentResponder]]; + [settingsViewController pushViewController:picker]; + return YES; + }]; # pragma mark - Theme YTSettingsSectionItem *themeGroup = [YTSettingsSectionItemClass itemWithTitle:LOC(@"THEME_OPTIONS") @@ -354,6 +469,16 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0] + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Low Contrast Mode") + titleDescription:LOC(@"this will Low Contrast texts and buttons just like how the old YouTube Interface did. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"lowContrastMode_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"lowContrastMode_enabled"]; + return YES; + } + settingItemId:0], lowContrastModeSection]; ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"THEME_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:GetSelection(@"appTheme") parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; @@ -361,6 +486,34 @@ extern NSBundle *uYouPlusBundle(); }]; [sectionItems addObject:themeGroup]; +# pragma mark - Customization Options + YTSettingsSectionItem *CustomizationGroup = [YTSettingsSectionItemClass itemWithTitle:@"Customization Options" accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + NSArray *rows = @[ + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Remove Modern Interface (YTNoModernUI)") + titleDescription:LOC(@"Toggle this on to remove any Modern Element added to YouTube. Removes Ambient Mode, Rounded Design & More. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"ytNoModernUI_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"ytNoModernUI_enabled"]; + return YES; + } + settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Low Contrast Mode") + titleDescription:LOC(@"this will Low Contrast texts and buttons just like how the old YouTube Interface did. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"lowContrastMode_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"lowContrastMode_enabled"]; + return YES; + } + settingItemId:0], lowContrastModeSection]; + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:@"Customization Options" pickerSectionTitle:nil rows:rows selectedItemIndex:GetSelection(@"UITheme") parentResponder:[self parentResponder]]; + [settingsViewController pushViewController:picker]; + return YES; + }]; + [sectionItems addObject:CustomizationGroup]; + # pragma mark - Miscellaneous YTSettingsSectionItem *miscellaneousGroup = [YTSettingsSectionItemClass itemWithTitle:LOC(@"MISCELLANEOUS") accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { NSArray *rows = @[ @@ -384,16 +537,6 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], - [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"ENABLE_FLEX") - titleDescription:LOC(@"ENABLE_FLEX_DESC") - accessibilityIdentifier:nil - switchOn:IsEnabled(@"flex_enabled") - switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { - [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"flex_enabled"]; - return YES; - } - settingItemId:0], - [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"ENABLE_YT_STARTUP_ANIMATION") titleDescription:LOC(@"ENABLE_YT_STARTUP_ANIMATION_DESC") accessibilityIdentifier:nil @@ -404,6 +547,26 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Remove Modern Interface (YTNoModernUI)") + titleDescription:LOC(@"Toggle this on to remove any Modern Element added to YouTube. Removes Ambient Mode, Rounded Design & More. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"ytNoModernUI_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"ytNoModernUI_enabled"]; + return YES; + } + settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide YouTube Logo") + titleDescription:LOC(@"Toggle this to hide the YouTube Logo in the YouTube App.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideYouTubeLogo_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideYouTubeLogo_enabled"]; + return YES; + } + settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_CHIP_BAR") titleDescription:LOC(@"HIDE_CHIP_BAR_DESC") accessibilityIdentifier:nil @@ -413,7 +576,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"IPHONE_LAYOUT") titleDescription:LOC(@"IPHONE_LAYOUT_DESC") accessibilityIdentifier:nil @@ -423,6 +586,26 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide uYou Tab") + titleDescription:LOC(@"Toggle this on to remove the uYou Tab added by MiRO's YouTube Tweak. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideuYouTab_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideuYouTab_enabled"]; + return YES; + } + settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide Labels in the Tab Bar") + titleDescription:LOC(@"this will Hide all of the labels in the Tab Bar. App restart is required.") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideTabBarLabels_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideTabBarLabels_enabled"]; + return YES; + } + settingItemId:0], [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"NEW_MINIPLAYER_STYLE") titleDescription:LOC(@"NEW_MINIPLAYER_STYLE_DESC") @@ -434,6 +617,26 @@ extern NSBundle *uYouPlusBundle(); } settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide Notifcation button in the Navigation bar") + titleDescription:LOC(@"") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideNotificationButton_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideNotificationButton_enabled"]; + return YES; + } + settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"Hide iSponsorBlock button in the Navigation bar") + titleDescription:LOC(@"") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"hideSponsorBlockButton_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideSponsorBlockButton_enabled"]; + return YES; + } + settingItemId:0], + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"YT_RE_EXPLORE") titleDescription:LOC(@"YT_RE_EXPLORE_DESC") accessibilityIdentifier:nil @@ -442,9 +645,18 @@ extern NSBundle *uYouPlusBundle(); [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"reExplore_enabled"]; return YES; } - settingItemId:0], - ]; - + settingItemId:0], + + [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"ENABLE_FLEX") + titleDescription:LOC(@"ENABLE_FLEX_DESC") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"flex_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"flex_enabled"]; + return YES; + } + settingItemId:0] + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"MISCELLANEOUS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; diff --git a/buildapp.sh b/buildapp.sh index a97e7ff..5b52f3e 100755 --- a/buildapp.sh +++ b/buildapp.sh @@ -21,6 +21,24 @@ else echo "> \033[1mCouldn't extract uYou\033[0m" fi +# Check Reborn +if [ ! -f Tweaks/uYou/YouTube.Reborn.v4.0.9.deb ] +then + echo -e "==> \033[1mReborn v4.0.9 is not found. Downloading Reborn (v4.0.9)...\033[0m" + (set -x ; curl https://github.com/LillieH1000/YouTube-Reborn/releases/download/4.0.9/YouTube.Reborn.v4.0.9.deb --output Tweaks/uYou/YouTube.Reborn.v4.0.9.deb) +else + echo -e "==> \033[1mFounded Reborn (v4.0.9)!\033[0m" +fi + +# Extract Reborn + echo -e "==> \033[1mExtracting Reborn...\033[0m" +if (cd Tweaks/uYou && tar -xf YouTube.Reborn.v4.0.9.deb && tar -xf data.tar.*) +then + echo -e "\033[1m> Extracted Reborn!\033[0m" +else + echo "> \033[1mCouldn't extract Reborn\033[0m" +fi + # Makefile if [ -d tmp ] then @@ -52,4 +70,4 @@ fi tput setaf 1 && echo -e "==> \033[1mCleaning up...\033[0m" find Tweaks/uYou -mindepth 1 ! -name "com.miro.uyou_2.3~1_iphoneos-arm.deb" ! -name ".gitkeep" -exec rm -rf {} \; 2>/dev/null rm -rf tmp/ Resources .theos/_/Payload - echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa)\033[0m" \ No newline at end of file + echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa)\033[0m" diff --git a/uYouPlus.xm b/uYouPlus.xm index d12135c..6ab8d2d 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -14,6 +14,7 @@ #import "Tweaks/YouTubeHeader/YTIPivotBarSupportedRenderers.h" #import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h" #import "Tweaks/YouTubeHeader/YTIBrowseRequest.h" +#import "Tweaks/YouTubeHeader/YTColorPalette.h" #import "Tweaks/YouTubeHeader/YTCommonColorPalette.h" #import "Tweaks/YouTubeHeader/ASCollectionView.h" #import "Tweaks/YouTubeHeader/YTPlayerOverlay.h" @@ -23,6 +24,7 @@ #import "Tweaks/YouTubeHeader/YTReelPlayerViewController.h" #import "Tweaks/YouTubeHeader/YTAlertView.h" #import "Tweaks/YouTubeHeader/YTISectionListRenderer.h" +#import "Tweaks/YouTubeHeader/YTPivotBarItemView.h" // Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f NSBundle *uYouPlusBundle() { @@ -71,6 +73,33 @@ static BOOL oledDarkTheme() { static BOOL oldDarkTheme() { return ([[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 2); } +static int colorContrastMode() { + return [[NSUserDefaults standardUserDefaults] integerForKey:@"lcmColor"]; +} +static BOOL defaultContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 0; +} +static BOOL redContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 1; +} +static BOOL blueContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 2; +} +static BOOL greenContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 3; +} +static BOOL yellowContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 4; +} +static BOOL orangeContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 5; +} +static BOOL purpleContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 6; +} +static BOOL pinkContrastMode() { + return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 7; +} // # pragma mark - uYou's patches @@ -447,6 +476,19 @@ static BOOL didFinishLaunching; - (BOOL)mainAppCoreClientIosTransientVisualGlitchInPivotBarFix { return NO; } // Fix uYou's label glitching - qnblackcat/uYouPlus#552 %end +// Hide Upgrade Dialog +%hook YTGlobalConfig +- (BOOL)shouldBlockUpgradeDialog { return YES;} +- (BOOL)shouldForceUpgrade { return NO;} +- (BOOL)shouldShowUpgrade { return NO;} +- (BOOL)shouldShowUpgradeDialog { return NO;} +%end + +// Disable Autoplay Settings Section - @qnblackcat +%hook YTSettingsSectionItemManager +- (void)updateAutoplaySectionWithEntry:(id)arg1 {} +%end + // NOYTPremium - https://github.com/PoomSmart/NoYTPremium/ %hook YTCommerceEventGroupHandler - (void)addEventHandlers {} @@ -496,6 +538,88 @@ static BOOL didFinishLaunching; - (BOOL)enablePlayerBarForVerticalVideoWhenControlsHiddenInFullscreen { return YES; } %end +// YTNoModernUI - arichorn +%group gYTNoModernUI +%hook YTColdConfig +// Disable Modern Content - YTNoModernUI +- (BOOL)creatorClientConfigEnableStudioModernizedMdeThumbnailPickerForClient { return NO; } +- (BOOL)cxClientEnableModernizedActionSheet { return NO; } +- (BOOL)enableClientShortsSheetsModernization { return NO; } +- (BOOL)enableTimestampModernizationForNative { return NO; } +- (BOOL)mainAppCoreClientIosEnableModernOssPage { return NO; } +// Disable Rounded Content - YTNoModernUI +- (BOOL)iosEnableRoundedSearchBar { return NO; } +- (BOOL)enableIosRoundedSearchBar { return NO; } +- (BOOL)iosDownloadsPageRoundedThumbs { return NO; } +- (BOOL)iosRoundedSearchBarSuggestZeroPadding { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableRoundedThumbnailsForNative { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableRoundedThumbnailsForNativeLongTail { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableRoundedTimestampForNative { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableRoundedDialogForNative { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableModernButtonsForNative { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableModernButtonsForNativeLongTail { return NO; } +- (BOOL)uiSystemsClientGlobalConfigEnableModernTabsForNative { return NO; } +- (BOOL)uiSystemsClientGlobalConfigIosEnableSnackbarModernization { return NO; } +// Disable Darker Dark Mode - YTNoModernUI +- (BOOL)enableDarkerDarkMode { return NO; } +- (BOOL)modernizeElementsTextColor { return NO; } +- (BOOL)modernizeElementsBgColor { return NO; } +- (BOOL)modernizeCollectionLockups { return NO; } +- (BOOL)uiSystemsClientGlobalConfigUseDarkerPaletteTextColorForNative { return NO; } +- (BOOL)uiSystemsClientGlobalConfigUseDarkerPaletteBgColorForNative { return NO; } +// Disable Ambient Mode +- (BOOL)enableCinematicContainer { return NO; } +- (BOOL)enableCinematicContainerOnClient { return NO; } +- (BOOL)iosCinematicContainerClientImprovement { return NO; } +// 16.42.3 Styled YouTube Channel Page Interface - YTNoModernUI +- (BOOL)channelsClientConfigIosChannelNavRestructuring { return NO; } +%end +%end + +// Hide YouTube Logo +%group gHideYouTubeLogo +%hook YTHeaderLogoController +- (YTHeaderLogoController *)init { + return NULL; +} +%end +%end + +// Hide YouTube Heatwaves in Video Player (YouTube v17.19.2-present) - @level3tjg - https://www.reddit.com/r/jailbreak/comments/v29yvk/ +%group gHideHeatwaves +%hook YTInlinePlayerBarContainerView +- (BOOL)canShowHeatwave { return NO; } +%end +%end + +%group gHideuYouTab +%hook YTPivotBarView +- (void)setRenderer:(YTIPivotBarRenderer *)renderer { + NSMutableArray *items = [renderer itemsArray]; + + NSUInteger index = [items indexOfObjectPassingTest:^BOOL(YTIPivotBarSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) { + return [[[renderers pivotBarItemRenderer] pivotIdentifier] isEqualToString:@"com.miro.uyou"]; + }]; + if (index != NSNotFound) [items removeObjectAtIndex:index]; + + %orig; +} +%end +%end + +# pragma mark - Hide Notification Button && SponsorBlock Button +%hook YTRightNavigationButtons +- (void)layoutSubviews { + %orig; + if (IsEnabled(@"hideNotificationButton_enabled")) { + self.notificationButton.hidden = YES; + } + if (IsEnabled(@"hideSponsorBlockButton_enabled")) { + self.sponsorBlockButton.hidden = YES; + } +} +%end + // YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo %hook YTMainAppVideoPlayerOverlayViewController - (void)setPaidContentWithPlayerData:(id)data { @@ -781,8 +905,8 @@ void DEMC_centerRenderingView() { - (id)init { id result = %orig; - const int size = 12; - float speeds[] = {0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0}; + const int size = 16; + float speeds[] = {0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0}; id varispeedSwitchControllerOptions[size]; for (int i = 0; i < size; ++i) { @@ -880,6 +1004,18 @@ void DEMC_centerRenderingView() { - (BOOL)removeNextPaddleForSingletonVideos { return YES; } - (BOOL)removePreviousPaddleForSingletonVideos { return YES; } %end + +// %hook YTMainAppControlsOverlayView // this is only used for v16.42.3 (incompatible with YouTube v17.22.3-newer) +// - (void)layoutSubviews { // hide Next & Previous legacy buttons +// %orig; +// if (IsEnabled(@"hidePreviousAndNextButton_enabled")) { +// MSHookIvar(self, "_nextButton").hidden = YES; +// MSHookIvar(self, "_previousButton").hidden = YES; +// MSHookIvar(self, "_nextButtonView").hidden = YES; +// MSHookIvar(self, "_previousButtonView").hidden = YES; +// } +// } +// %end %end // Replace Next & Previous button with Fast forward & Rewind button @@ -890,6 +1026,25 @@ void DEMC_centerRenderingView() { %end %end +%group gHideOverlayDarkBackground +%hook YTMainAppVideoPlayerOverlayView +- (void)setBackgroundVisible:(BOOL)arg1 { + %orig(NO); +} +%end +%end + +%group gHideVideoPlayerShadowOverlayButtons +%hook YTMainAppControlsOverlayView +- (void)layoutSubviews { + %orig(); + MSHookIvar(self, "_previousButtonView").backgroundColor = nil; + MSHookIvar(self, "_nextButtonView").backgroundColor = nil; + MSHookIvar(self, "_playPauseButton").backgroundColor = nil; +} +%end +%end + // Bring back the red progress bar %hook YTColdConfig - (BOOL)segmentablePlayerBarUpdateColors { @@ -910,6 +1065,10 @@ void DEMC_centerRenderingView() { if (IsEnabled(@"hideShortsChannelAvatar_enabled")) {} else { return %orig; } } +- (void)setReelLikeButton:(id)arg1 { + if (IsEnabled(@"hideShortsLikeButton_enabled")) {} + else { return %orig; } +} - (void)setReelDislikeButton:(id)arg1 { if (IsEnabled(@"hideShortsDislikeButton_enabled")) {} else { return %orig; } @@ -1153,18 +1312,18 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: - (void)didMoveToWindow { %orig; if (isDarkMode()) { - if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = [UIColor clearColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor clearColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = [UIColor blackColor]; } - if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; } + if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) self.backgroundColor = [UIColor clearColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) self.superview.backgroundColor = [UIColor clearColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) self.superview.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) self.backgroundColor = [UIColor blackColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; } } } %end @@ -1199,6 +1358,749 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: %end %end +%group gLowContrastMode // Low Contrast Mode v1.2.2 (Compatible with only v15.02.1-present) +%hook UIColor ++ (UIColor *)whiteColor { // Dark Theme Color + return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; +} ++ (UIColor *)textColor { // Light Theme Color + return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; +} +%end + +%hook YTColorPalette // Changes Texts & Icons in YouTube Bottom Bar + Text Icons under Video Player +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +%end + +%hook YTCommonColorPalette // Changes Texts & Icons in YouTube Bottom Bar (Doesn't change Texts & Icons under the video player) +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)badgeChipBackground { + if (self.pageStyle == 1) { + return [UIColor blackColor]; + } + return [UIColor blackColor]; +} +- (UIColor *)buttonChipBackgroundHover { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)overlayButtonPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)overlayButtonSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)staticBrandWhite { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)staticBrandBlack { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)brandIconActive { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)brandIconInactive { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +- (UIColor *)brandButtonBackground { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme +} +%end + +%hook YTCollectionView // Changes Live Chat Texts + - (void)setTintColor:(UIColor *)color { + return isDarkMode() ? %orig([UIColor whiteColor]) : %orig; + } + %end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +- (UIColor *)ELMAnimatedVectorView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gRedContrastMode // Red Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.97 green: 0.15 blue: 0.15 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gBlueContrastMode // Blue Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 0.04 green: 0.47 blue: 0.72 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 0.04 green: 0.47 blue: 0.72 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.04 green: 0.47 blue: 0.72 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.04 green: 0.41 blue: 0.62 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.04 green: 0.41 blue: 0.62 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.04 green: 0.41 blue: 0.62 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.04 green: 0.41 blue: 0.62 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gGreenContrastMode // Green Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 0.01 green: 0.66 blue: 0.18 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 0.01 green: 0.66 blue: 0.18 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.01 green: 0.66 blue: 0.18 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.00 green: 0.50 blue: 0.13 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.00 green: 0.50 blue: 0.13 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.00 green: 0.50 blue: 0.13 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.00 green: 0.50 blue: 0.13 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gYellowContrastMode // Yellow Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 0.89 green: 0.82 blue: 0.20 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 0.89 green: 0.82 blue: 0.20 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.89 green: 0.82 blue: 0.20 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.77 green: 0.71 blue: 0.14 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.77 green: 0.71 blue: 0.14 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.77 green: 0.71 blue: 0.14 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.77 green: 0.71 blue: 0.14 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gOrangeContrastMode // Orange Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 0.73 green: 0.45 blue: 0.05 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 0.73 green: 0.45 blue: 0.05 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.73 green: 0.45 blue: 0.05 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.80 green: 0.49 blue: 0.05 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.80 green: 0.49 blue: 0.05 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.80 green: 0.49 blue: 0.05 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.80 green: 0.49 blue: 0.05 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gPurpleContrastMode // Purple Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 0.62 green: 0.01 blue: 0.73 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 0.62 green: 0.01 blue: 0.73 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 0.62 green: 0.01 blue: 0.73 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.44 green: 0.00 blue: 0.52 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.44 green: 0.00 blue: 0.52 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.44 green: 0.00 blue: 0.52 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.44 green: 0.00 blue: 0.52 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + +%group gPinkContrastMode // Pink Contrast Mode +%hook UIColor ++ (UIColor *)whiteColor { + return [UIColor colorWithRed: 1.00 green: 0.57 blue: 0.94 alpha: 1.00]; +} ++ (UIColor *)textColor { + return [UIColor colorWithRed: 1.00 green: 0.57 blue: 0.94 alpha: 1.00]; +} ++ (UIColor *)dynamicLabelColor { + return [UIColor colorWithRed: 1.00 green: 0.57 blue: 0.94 alpha: 1.00]; +} +%end + +%hook YTColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.75 green: 0.42 blue: 0.71 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.75 green: 0.42 blue: 0.71 alpha: 1.00]; // Light Theme + } +%end + +%hook YTCommonColorPalette +- (UIColor *)textPrimary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.75 green: 0.42 blue: 0.71 alpha: 1.00]; // Light Theme + } +- (UIColor *)textSecondary { + if (self.pageStyle == 1) { + return [UIColor whiteColor]; // Dark Theme + } + return [UIColor colorWithRed: 0.75 green: 0.42 blue: 0.71 alpha: 1.00]; // Light Theme + } +%end + +%hook YTQTMButton // Changes Tweak Icons/Texts/Images +- (UIColor *)whiteColor { + return [UIColor whiteColor]; +} +- (UIColor *)sponsorBlockButton { + return [UIColor whiteColor]; +} +%end + +%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. +- (UIColor *)_ASDisplayView { + return [UIColor whiteColor]; +} +%end + +%hook _ASDisplayView +- (void)didMoveToWindow { + %orig; + // LCM Button Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.chip.primary_tap_container"]) self.backgroundColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.compact_subscribe_button"]) self.backgroundColor = [UIColor whiteColor]; + // LCM Icon & Text Elements + if ([self.accessibilityIdentifier isEqualToString:@"id.video.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.share.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.video.add_to.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.author_container"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.comment.content.label"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.add_to.offline.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comments_entry_point_teaser"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.like.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.dislike.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment.reply.button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.dislike_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"id.ui.backstage.comment_button"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.live_chat_text_message"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.metadata"]) self.tintColor = [UIColor whiteColor]; + if ([self.accessibilityIdentifier isEqualToString:@"eml.overflow_button"]) self.tintColor = [UIColor whiteColor]; +} +%end +%end + // OLED keyboard by @ichitaso <3 - http://gist.github.com/ichitaso/935100fd53a26f18a9060f7195a1be0e %group gOLEDKB %hook UIPredictionViewController @@ -1255,6 +2157,12 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: %end %end +// Won't Work Yet - Bump uYou Version +// %hook _UITableViewHeaderFooterViewLabel +// - (void)setNeedsLayout +// NSString "uYou v2.1" = "uYou v2.3~1"; +// %end + // Hide the Chip Bar (Upper Bar) in Home feed %group gHideChipBar %hook YTMySubsFilterHeaderView @@ -1278,6 +2186,16 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: // %end %end +%group gHideTabBarLabels // https://github.com/LillieH001/YouTube-Reborn +%hook YTPivotBarItemView +- (void)layoutSubviews { + %orig(); + [[self navigationButton] setTitle:@"" forState:UIControlStateNormal]; + [[self navigationButton] setTitle:@"" forState:UIControlStateSelected]; +} +%end +%end + %group giPhoneLayout %hook UIDevice - (long long)userInterfaceIdiom { @@ -1291,12 +2209,12 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: %end %hook UIKBTree - (long long)nativeIdiom { - return YES; + return NO; } %end %hook UIKBRenderer - (long long)assetIdiom { - return YES; + return NO; } %end %end @@ -1332,12 +2250,18 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: if (IsEnabled(@"replacePreviousAndNextButton_enabled")) { %init(gReplacePreviousAndNextButton); } - if (oledDarkTheme()) { - %init(gOLED); + if (IsEnabled(@"hideOverlayDarkBackground_enabled")) { + %init(gHideOverlayDarkBackground); + } + if (IsEnabled(@"hideVideoPlayerShadowOverlayButtons_enabled")) { + %init(gHideVideoPlayerShadowOverlayButtons); } if (oldDarkTheme()) { %init(gOldDarkTheme) } + if (oledDarkTheme()) { + %init(gOLED) + } if (IsEnabled(@"oledKeyBoard_enabled")) { %init(gOLEDKB); } @@ -1350,14 +2274,54 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: if (IsEnabled(@"iPhoneLayout_enabled") && (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad)) { %init(giPhoneLayout); } + if (IsEnabled(@"hideTabBarLabels")) { + %init(gHideTabBarLabels); + } + if (IsEnabled(@"hideYouTubeLogo_enabled")) { + %init(gHideYouTubeLogo); + } + if (IsEnabled(@"hideuYouTab_enabled")) { + %init(gHideuYouTab); + } + if (IsEnabled(@"hideHeatwaves_enabled")) { + %init(gHideHeatwaves); + } + if (IsEnabled(@"ytNoModernUI_enabled")) { + %init(gYTNoModernUI); + } + if (defaultContrastMode()) { + %init(gLowContrastMode); + } + if (redContrastMode()) { + %init(gRedContrastMode); + } + if (blueContrastMode()) { + %init(gBlueContrastMode); + } + if (greenContrastMode()) { + %init(gGreenContrastMode); + } + if (yellowContrastMode()) { + %init(gYellowContrastMode); + } + if (orangeContrastMode()) { + %init(gOrangeContrastMode); + } + if (purpleContrastMode()) { + %init(gPurpleContrastMode); + } + if (pinkContrastMode()) { + %init(gPinkContrastMode); + } // Disable updates [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"automaticallyCheckForUpdates"]; // Disable broken options of uYou - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"]; - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"disableAgeRestriction"]; - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"showedWelcomeVC"]; + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"]; // Remove YouTube Ads Disabled - Reason was due because it stopped working. + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"disableAgeRestriction"]; // Disable Age Restriction Disabled - Reason is the same as above. + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"showedWelcomeVC"]; // uYou Welcome Screen Disabled - Reason is because you can't hide the prompt in iOS 16.1-present. + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeShortsSection"]; // Remove Shorts Section Disabled - reason was due to not being consistent enough. // Change the default value of some options NSArray *allKeys = [[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys];