├── .gitattributes ├── .gitignore ├── LICENSE ├── Makefile ├── Tweak.x ├── YTDarker.plist └── control /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .theos 2 | .DS_Store 3 | packages -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 - 2024 PoomSmart 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:11.0 2 | PACKAGE_VERSION = 1.0.3 3 | INSTALL_TARGET_PROCESSES = YouTube 4 | ARCHS = arm64 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | 8 | TWEAK_NAME = YTDarker 9 | 10 | $(TWEAK_NAME)_FILES = Tweak.x 11 | $(TWEAK_NAME)_CFLAGS = -fobjc-arc 12 | 13 | include $(THEOS_MAKE_PATH)/tweak.mk 14 | -------------------------------------------------------------------------------- /Tweak.x: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | %hook YTColdConfig 6 | 7 | - (BOOL)enableDarkerDarkMode { 8 | return YES; 9 | } 10 | 11 | - (BOOL)useDarkerPaletteBgColorForElements { 12 | return YES; 13 | } 14 | 15 | - (BOOL)useDarkerPaletteTextColorForElements { 16 | return YES; 17 | } 18 | 19 | - (BOOL)uiSystemsClientGlobalConfigUseDarkerPaletteBgColorForNative { 20 | return YES; 21 | } 22 | 23 | - (BOOL)uiSystemsClientGlobalConfigUseDarkerPaletteTextColorForNative { 24 | return YES; 25 | } 26 | 27 | %end 28 | 29 | %hook YTColorPalette 30 | 31 | - (UIColor *)brandBackgroundPrimary { 32 | return [self pageStyle] == 1 ? [%c(YTColor) black3] : %orig; 33 | } 34 | 35 | %end 36 | 37 | %hook YTCommonColorPalette 38 | 39 | - (UIColor *)brandBackgroundPrimary { 40 | return [self pageStyle] == 1 ? [%c(YTColor) black3] : %orig; 41 | } 42 | 43 | - (UIColor *)background1 { 44 | return [self pageStyle] == 1 ? [%c(YTColor) black3] : %orig; 45 | } 46 | 47 | - (UIColor *)raisedBackground { 48 | return [self pageStyle] == 1 ? [%c(YTColor) black3] : %orig; 49 | } 50 | 51 | %end 52 | 53 | %hook YTAccountPanelBodyViewController 54 | 55 | - (UIColor *)backgroundColor:(NSInteger)pageStyle { 56 | if (pageStyle == 1) { 57 | if (%c(YTCommonColorPalette)) 58 | return [[%c(YTCommonColorPalette) darkPalette] background1]; 59 | return [[%c(YTColorPalette) darkPalette] background1]; 60 | } 61 | return %orig; 62 | } 63 | 64 | %end -------------------------------------------------------------------------------- /YTDarker.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.google.ios.youtube" ); }; } 2 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.ps.ytdarker 2 | Name: YTDarker 3 | Version: 1.0.0 4 | Architecture: iphoneos-arm 5 | Description: Enable native darker dark mode on YouTube. 6 | Maintainer: PoomSmart 7 | Author: PoomSmart 8 | Section: Tweaks 9 | Depends: mobilesubstrate (>= 0.9.5000), firmware (>= 11.0) 10 | --------------------------------------------------------------------------------