commit2ece340746Merge:f652976ca84635Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Tue Aug 20 00:52:28 2024 -0700 Merge pull request #358 from bhackel/gestures Gestures and Loop commitca84635cf4Merge:506671687d7b57Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Tue Aug 20 00:31:16 2024 -0700 Merge branch 'main' into gestures commit5066716f7fAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 19 23:53:21 2024 -0700 Localizations for Gestures commitbed87298f6Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sun Aug 18 22:25:52 2024 -0700 Update Submodule commit87d7b576ddAuthor: GitHub Actions <actions@github.com> Date: Tue Aug 20 00:53:21 2024 +0000 updated submodules commitf652976a53Author: GitHub Actions <actions@github.com> Date: Tue Aug 20 00:44:56 2024 +0000 updated submodules commit44d6ffe781Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 19 14:08:08 2024 -0700 Create LICENSE commit023fafae15Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sun Aug 18 18:17:32 2024 -0700 Added YouLoop submodule to Tweaks/ folder commit4c5e2ee0e8Author: GitHub Actions <actions@github.com> Date: Sun Aug 18 00:49:27 2024 +0000 updated submodules commitde89f7aca8Author: GitHub Actions <actions@github.com> Date: Sat Aug 17 00:43:19 2024 +0000 updated submodules commit36f9da844bAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 09:27:09 2024 -0700 Add disable option commite63bc374cfAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 01:13:22 2024 -0700 Fix defaults and text descriptions commit067ad5a373Merge:b081d5b6e8bbcbAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 01:40:45 2024 -0700 Merge pull request #345 from bhackel/video-player Basic Video player commit6e8bbcb49eAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 01:01:33 2024 -0700 Add localization commite21e026c30Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 00:32:22 2024 -0700 Fix compile commit1647358a9eMerge:feaaa072d82e0bAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 00:35:06 2024 -0700 Merge branch 'main' into video-player commitfeaaa07e9eAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 00:33:37 2024 -0700 Revert "Prototype 2" This reverts commit8f578bb741. commitf434239419Merge:e6269972d82e0bAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 00:26:24 2024 -0700 Merge branch 'main' into gestures commite62699749dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 16 00:25:24 2024 -0700 Sensitivity and Deadzone settings commit4602b74e6fAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Thu Aug 15 23:15:18 2024 -0700 Add deadzone commit6854f91c1eAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Thu Aug 15 10:45:27 2024 -0700 Implement gesture selection commitb081d5b52eAuthor: GitHub Actions <actions@github.com> Date: Fri Aug 16 00:44:28 2024 +0000 updated submodules commit8ed3d97d2dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 14 23:56:27 2024 -0700 Gesture refactor for settings commite92ada8427Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 14 22:20:36 2024 -0700 Gesture settings commit8f578bb741Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 14 18:28:42 2024 -0700 Prototype 2 commit2d82e0b532Author: GitHub Actions <actions@github.com> Date: Thu Aug 15 00:43:33 2024 +0000 updated submodules commitb963c807bbAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 14 09:15:43 2024 -0700 Video player prototype commit10882e5d61Merge:4ed8e9476f48a2Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 14 09:00:51 2024 -0700 Merge branch 'main' into gestures commit4ed8e94880Merge:b588b7f9aa33a6Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Tue Aug 13 23:41:37 2024 -0700 Merge branch 'main' into gestures commitb588b7f6d0Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Tue Aug 13 22:02:23 2024 -0700 Attempt seek gesture commit9aa33a676dAuthor: GitHub Actions <actions@github.com> Date: Wed Aug 14 00:53:53 2024 +0000 updated submodules commit76f48a2700Author: GitHub Actions <actions@github.com> Date: Wed Aug 14 00:45:08 2024 +0000 updated submodules commit45b7cd948eAuthor: schweppes <schweppes0x@gmail.com> Date: Wed Aug 14 01:33:23 2024 +0200 Bulgarian translations (#332) Co-authored-by: tonydalov <t.dalov@dictu.nl> commit4c24c0c336Author: gototheskinny <51786709+gototheskinny@users.noreply.github.com> Date: Wed Aug 14 02:33:12 2024 +0300 Turkish loc updated (#336) commitdd88efc631Merge:6e609d5e067e8dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 12 23:05:35 2024 -0700 Merge pull request #331 from bhackel/fix-oled-live-chat Fix OLED live chat commite067e8dec5Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 12 21:50:33 2024 -0700 Fix OLED live chat commit6e609d56e7Merge:916bcf311faee3Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 12 22:43:28 2024 -0700 Merge pull request #330 from bhackel/remove-speed-popup Remove speed popup commit11faee3f1eMerge:82e4f21916bcf3Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 12 22:42:56 2024 -0700 Merge branch 'main' into remove-speed-popup I used a translator, hopefully it is fine commit82e4f21d24Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 12 21:33:53 2024 -0700 Add Hide Speed Toast commit916bcf33ffAuthor: GitHub Actions <actions@github.com> Date: Tue Aug 13 00:46:14 2024 +0000 updated submodules commit9d0fb16075Author: Victor Alves <victoralves05@gmail.com> Date: Mon Aug 12 17:12:18 2024 -0300 Update Portuguese localization (#326) * Update Portuguese Localization commit21df218f2fAuthor: Balackburn <93828569+Balackburn@users.noreply.github.com> Date: Mon Aug 12 10:42:23 2024 +0200 Updated Credits commitf384a00e04Author: GitHub Actions <actions@github.com> Date: Mon Aug 12 00:46:59 2024 +0000 updated submodules commit10a536880bMerge:818005d08c263fAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat Aug 10 05:28:47 2024 -0700 Merge pull request #320 from bhackel/hud-and-collapse Copy Hide HUD and Hide Collapse Button commit08c263fdf0Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat Aug 10 04:07:47 2024 -0700 Copy Hide HUD and Hide Collapse Button commit818005d73cMerge:37582ec1a97587Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat Aug 10 03:48:54 2024 -0700 Merge pull request #319 from bhackel/misc-features Misc features commit1a9758770dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat Aug 10 02:34:42 2024 -0700 Fix bugs commitf64aab1b58Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat Aug 10 02:19:23 2024 -0700 Fix build error commit762cd8f618Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sat Aug 10 00:47:05 2024 -0700 Remove YTLitePlus OLED Theme commitba13d1b987Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 22:44:51 2024 -0700 Live Chat OLED dark mode commit753d690b78Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 22:38:19 2024 -0700 Hide autoplay mini preview commitc9875ec8b7Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 17:26:19 2024 -0700 Fix localization, fix copy/paste switch commit11a3e75b0dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 16:44:59 2024 -0700 Default disable big mini player commit794fb561c9Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 16:29:34 2024 -0700 Fix import export settings localization commit4f2b55a897Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 16:34:57 2024 -0700 Hide comment previews by @arichornlover commit948ea5ff29Author: GitHub Actions <actions@github.com> Date: Sat Aug 10 00:53:31 2024 +0000 updated submodules commit37582ecbf8Author: GitHub Actions <actions@github.com> Date: Sat Aug 10 00:44:53 2024 +0000 updated submodules commit64c712d630Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri Aug 9 16:51:12 2024 -0700 Attempt brightness and volume gestures commit91290efdfeAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 7 13:24:51 2024 -0700 Allow other gestures commitf2e7c234ebAuthor: GitHub Actions <actions@github.com> Date: Fri Aug 9 00:45:23 2024 +0000 updated submodules commite7523dc08dAuthor: GitHub Actions <actions@github.com> Date: Thu Aug 8 00:44:57 2024 +0000 updated submodules commit09ddc42e32Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed Aug 7 12:11:03 2024 -0700 Add reporting option commitd4679b8414Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Tue Aug 6 23:49:31 2024 -0700 Attempt Volume Sliding commitdf3d09e81dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Tue Aug 6 22:36:59 2024 -0700 Gesture test using YTHFS code commitd731dbddecAuthor: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Tue Aug 6 21:06:02 2024 -0500 Fix LowContrastMode description also added Version compatibility, LowContrastMode will not work once v17.38.10 is gone in the future. commit00bb15a868Author: GitHub Actions <actions@github.com> Date: Wed Aug 7 00:45:08 2024 +0000 updated submodules commit8a717e763aAuthor: GitHub Actions <actions@github.com> Date: Tue Aug 6 00:44:29 2024 +0000 updated submodules commit47562c543bAuthor: ChuDucManh <89825108+manhchuduc@users.noreply.github.com> Date: Tue Aug 6 01:52:29 2024 +0700 Update Localizable.strings (#305) commitd27150b11dAuthor: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 5 03:16:34 2024 -0700 Fix delete workflows commit46d6b163b9Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Mon Aug 5 03:09:41 2024 -0700 Fix YouTube Extensions bug
838 lines
25 KiB
Text
838 lines
25 KiB
Text
#import "../YTLitePlus.h"
|
|
|
|
static BOOL isDarkMode() {
|
|
return ([[NSUserDefaults standardUserDefaults] integerForKey:@"page_style"] == 1);
|
|
}
|
|
static BOOL oldDarkTheme() {
|
|
return ([[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] == 1);
|
|
}
|
|
|
|
// Themes.xm - Theme Options
|
|
// Old dark theme (gray)
|
|
%group gOldDarkTheme
|
|
UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:1.0];
|
|
%hook YTCommonColorPalette
|
|
- (UIColor *)background1 {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)background2 {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)background3 {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)brandBackgroundSolid {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)brandBackgroundPrimary {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)brandBackgroundSecondary {
|
|
return self.pageStyle == 1 ? [customColor colorWithAlphaComponent:0.9] : %orig;
|
|
}
|
|
- (UIColor *)raisedBackground {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)staticBrandBlack {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)generalBackgroundA {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)generalBackgroundB {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)baseBackground {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
- (UIColor *)menuBackground {
|
|
return self.pageStyle == 1 ? customColor : %orig;
|
|
}
|
|
%end
|
|
%hook SponsorBlockSettingsController
|
|
- (void)viewDidLoad {
|
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
|
%orig;
|
|
self.tableView.backgroundColor = customColor;
|
|
} else { return %orig; }
|
|
}
|
|
%end
|
|
%hook SponsorBlockViewController
|
|
- (void)viewDidLoad {
|
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
|
%orig;
|
|
self.view.backgroundColor = customColor;
|
|
} else { return %orig; }
|
|
}
|
|
%end
|
|
%hook YTAsyncCollectionView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
|
|
color = [UIColor clearColor];
|
|
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
|
|
color = [UIColor clearColor];
|
|
} else {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%orig;
|
|
}
|
|
- (UIColor *)darkBackgroundColor {
|
|
return isDarkMode() ? customColor : %orig;
|
|
}
|
|
- (void)setDarkBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
- (void)layoutSubviews {
|
|
%orig();
|
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
|
|
if (isDarkMode()) {
|
|
self.subviews[0].subviews[0].backgroundColor = customColor;
|
|
}
|
|
}
|
|
}
|
|
%end
|
|
|
|
// Hide separators
|
|
%hook YTCollectionSeparatorView
|
|
- (void)setHidden:(BOOL)arg1 {
|
|
%orig(YES);
|
|
}
|
|
%end
|
|
|
|
%hook ASScrollView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
|
|
%hook YTPivotBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSubheaderContainerView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTAppView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCollectionView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelListSubMenuView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSettingsCell
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSlideForActionsView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPageView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTWatchView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPlaylistMiniBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTEngagementPanelView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTEngagementPanelHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPlaylistPanelControlsView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTHorizontalCardListView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTWatchMiniBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCreateCommentAccessoryView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCreateCommentTextView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSearchView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSearchBoxView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTTabTitlesView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPrivacyTosFooterView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTOfflineStorageUsageView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTInlineSignInView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTFeedChannelFilterHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YCHLiveChatView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YCHLiveChatActionPanelView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTEmojiTextView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTTopAlignedView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
- (void)layoutSubviews {
|
|
%orig();
|
|
if (isDarkMode()) {
|
|
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = customColor;
|
|
}
|
|
}
|
|
%end
|
|
%hook GOODialogView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTNavigationBar
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
- (void)setBarTintColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelMobileHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelSubMenuView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTWrapperSplitView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTReelShelfCell
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTReelShelfItemView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTReelShelfView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCommentView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelListSubMenuAvatarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSearchBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTDialogContainerScrollView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTShareTitleView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTShareBusyView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTELMView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTActionSheetHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig(customColor) : %orig;
|
|
}
|
|
%end
|
|
%hook YTShareMainView
|
|
- (void)layoutSubviews {
|
|
%orig();
|
|
if (isDarkMode()) {
|
|
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = customColor;
|
|
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = customColor;
|
|
}
|
|
}
|
|
%end
|
|
%hook _ASDisplayView
|
|
- (void)layoutSubviews {
|
|
%orig;
|
|
if (isDarkMode()) {
|
|
UIResponder *responder = [self nextResponder];
|
|
while (responder != nil) {
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTActionSheetDialogViewController")]) {
|
|
self.backgroundColor = customColor;
|
|
}
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTPanelLoadingStrategyViewController")]) {
|
|
self.backgroundColor = customColor;
|
|
}
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTTabHeaderElementsViewController")]) {
|
|
self.backgroundColor = customColor;
|
|
}
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTEditSheetControllerElementsContentViewController")]) {
|
|
self.backgroundColor = customColor;
|
|
}
|
|
responder = [responder nextResponder];
|
|
}
|
|
}
|
|
}
|
|
- (void)didMoveToWindow {
|
|
%orig;
|
|
if (isDarkMode()) {
|
|
if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = [UIColor clearColor]; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor clearColor]; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = customColor; }
|
|
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; }
|
|
}
|
|
}
|
|
%end
|
|
%hook YTCinematicContainerView
|
|
- (void)setHidden:(BOOL)arg1 {
|
|
%orig(YES);
|
|
}
|
|
%end
|
|
%end
|
|
|
|
// OLED dark mode by @BandarHL and modified by @arichorn
|
|
/*
|
|
%group gOLED
|
|
%hook YTCommonColorPalette
|
|
- (UIColor *)background1 {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)background2 {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)background3 {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)brandBackgroundSolid {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)brandBackgroundPrimary {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)brandBackgroundSecondary {
|
|
return self.pageStyle == 1 ? [[UIColor blackColor] colorWithAlphaComponent:0.9] : %orig;
|
|
}
|
|
- (UIColor *)raisedBackground {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)staticBrandBlack {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)generalBackgroundA {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)generalBackgroundB {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)baseBackground {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (UIColor *)menuBackground {
|
|
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
|
}
|
|
%end
|
|
%hook SponsorBlockSettingsController
|
|
- (void)viewDidLoad {
|
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
|
%orig;
|
|
self.tableView.backgroundColor = [UIColor blackColor];
|
|
} else { return %orig; }
|
|
}
|
|
%end
|
|
%hook SponsorBlockViewController
|
|
- (void)viewDidLoad {
|
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
|
%orig;
|
|
self.view.backgroundColor = [UIColor blackColor];
|
|
} else { return %orig; }
|
|
}
|
|
%end
|
|
%hook YTAsyncCollectionView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
|
|
color = [UIColor clearColor];
|
|
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
|
|
color = [UIColor clearColor];
|
|
} else {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%orig;
|
|
}
|
|
- (UIColor *)darkBackgroundColor {
|
|
return isDarkMode() ? [UIColor blackColor] : %orig;
|
|
}
|
|
- (void)setDarkBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
- (void)layoutSubviews {
|
|
%orig();
|
|
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
|
|
if (isDarkMode()) {
|
|
self.subviews[0].subviews[0].backgroundColor = [UIColor blackColor];
|
|
}
|
|
}
|
|
}
|
|
%end
|
|
|
|
// Hide separators
|
|
%hook YTCollectionSeparatorView
|
|
- (void)setHidden:(BOOL)arg1 {
|
|
%orig(YES);
|
|
}
|
|
%end
|
|
|
|
%hook YTPivotBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
|
|
%hook ASScrollView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
|
|
%hook YTHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSubheaderContainerView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTAppView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCollectionView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelListSubMenuView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSettingsCell
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSlideForActionsView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPageView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTWatchView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPlaylistMiniBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTEngagementPanelView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTEngagementPanelHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPlaylistPanelControlsView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTHorizontalCardListView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTWatchMiniBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCreateCommentAccessoryView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCreateCommentTextView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSearchView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSearchBoxView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTTabTitlesView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTPrivacyTosFooterView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTOfflineStorageUsageView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTInlineSignInView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTFeedChannelFilterHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YCHLiveChatView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YCHLiveChatActionPanelView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTEmojiTextView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTTopAlignedView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
- (void)layoutSubviews {
|
|
%orig();
|
|
if (isDarkMode()) {
|
|
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = [UIColor blackColor];
|
|
}
|
|
}
|
|
%end
|
|
%hook GOODialogView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTNavigationBar
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
- (void)setBarTintColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelMobileHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelSubMenuView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTWrapperSplitView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTReelShelfCell
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTReelShelfItemView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTReelShelfView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTCommentView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTChannelListSubMenuAvatarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTSearchBarView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTDialogContainerScrollView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTShareTitleView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTShareBusyView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTELMView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTActionSheetHeaderView
|
|
- (void)setBackgroundColor:(UIColor *)color {
|
|
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
|
|
}
|
|
%end
|
|
%hook YTShareMainView
|
|
- (void)layoutSubviews {
|
|
%orig();
|
|
if (isDarkMode()) {
|
|
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = [UIColor blackColor];
|
|
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = [UIColor blackColor];
|
|
}
|
|
}
|
|
%end
|
|
%hook _ASDisplayView
|
|
- (void)layoutSubviews {
|
|
%orig;
|
|
if (isDarkMode()) {
|
|
UIResponder *responder = [self nextResponder];
|
|
while (responder != nil) {
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTActionSheetDialogViewController")]) {
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTPanelLoadingStrategyViewController")]) {
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTTabHeaderElementsViewController")]) {
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
if ([responder isKindOfClass:NSClassFromString(@"YTEditSheetControllerElementsContentViewController")]) {
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
responder = [responder nextResponder];
|
|
}
|
|
}
|
|
}
|
|
- (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:@"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.filter_chip_bar"]) { 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
|
|
%hook YTCinematicContainerView
|
|
- (void)setHidden:(BOOL)arg1 {
|
|
%orig(YES);
|
|
}
|
|
%end
|
|
%end
|
|
*/
|
|
|
|
// OLED keyboard by @ichitaso <3 - http://gist.github.com/ichitaso/935100fd53a26f18a9060f7195a1be0e
|
|
%group gOLEDKB
|
|
%hook TUIEmojiSearchView
|
|
- (void)didMoveToWindow {
|
|
%orig;
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
%end
|
|
|
|
%hook UIPredictionViewController
|
|
- (void)loadView {
|
|
%orig;
|
|
[self.view setBackgroundColor:[UIColor blackColor]];
|
|
}
|
|
%end
|
|
|
|
%hook UICandidateViewController
|
|
- (void)loadView {
|
|
%orig;
|
|
[self.view setBackgroundColor:[UIColor blackColor]];
|
|
}
|
|
%end
|
|
|
|
%hook UIKeyboardDockView
|
|
- (void)didMoveToWindow {
|
|
%orig;
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
%end
|
|
|
|
%hook UIKeyboardLayoutStar
|
|
- (void)didMoveToWindow {
|
|
%orig;
|
|
self.backgroundColor = [UIColor blackColor];
|
|
}
|
|
%end
|
|
|
|
%hook UIKBRenderConfig // Prediction text color
|
|
- (void)setLightKeyboard:(BOOL)arg1 { %orig(NO); }
|
|
%end
|
|
%end
|
|
|
|
# pragma mark - ctor
|
|
%ctor {
|
|
%init;
|
|
if (IsEnabled(@"oledKeyBoard_enabled")) {
|
|
%init(gOLEDKB);
|
|
}
|
|
if (oldDarkTheme()) {
|
|
%init(gOldDarkTheme);
|
|
}
|
|
}
|