Improvements to the Fix LowContrastMode Option

This commit is contained in:
arichornlover 2024-04-03 15:25:14 -05:00 committed by GitHub
parent 66fe4bf6e2
commit 380e0c4aaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -352,6 +352,15 @@ BOOL isAd(YTIElementRenderer *self) {
// Fix LowContrastMode - @arichornlover
%group gFixLowContrastMode
%hook NSUserDefaults
- (NSInteger)integerForKey:(NSString *)defaultName {
if ([defaultName isEqualToString:@"lcm"]) {
return contrastMode();
}
return %orig;
}
%end
%hook NSBundle
- (id)objectForInfoDictionaryKey:(NSString *)key {
if ([key isEqualToString:@"CFBundleShortVersionString"]) {
@ -367,6 +376,7 @@ BOOL isAd(YTIElementRenderer *self) {
}
%end
/*
%hook YTSettingsCell // Remove v17.38.10 Version Number - @Dayanch96
- (void)setDetailText:(id)arg1 {
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
@ -377,9 +387,10 @@ BOOL isAd(YTIElementRenderer *self) {
} %orig(arg1);
}
%end
*/
%end
// Disable Modern/Rounded Buttons (_ASDisplayView not included) - @arichornlover
// Disable Modern/Rounded Buttons (_ASDisplayView Version's not included) - @arichornlover
%group gDisableModernButtons
%hook YTQTMButton // Disable Modern/Rounded Buttons
+ (BOOL)buttonModernizationEnabled { return NO; }