Compare commits

...
Author SHA1 Message Date
qnblackcat f325a31196 v17.26.2-2.1 2022-07-11 20:20:26 +07:00
qnblackcat cab48bbe9e update submodules 2022-07-11 19:57:05 +07:00
qnblackcat 5424e4a9e8 use ARC 2022-07-01 10:06:34 +07:00
qnblackcat d7a7c90cf0 update localization 2022-07-01 10:05:19 +07:00
qnblackcat fe45ebaac1 update Header.h 2022-07-01 10:05:02 +07:00
qnblackcat 4590369aa1 clean up 2022-07-01 10:04:55 +07:00
qnblackcat 36bf21ad2e update localization 2022-06-30 10:28:38 +07:00
qnblackcat c2d1581698 hide Paid promotion card by @PoomSmart 2022-06-30 10:28:19 +07:00
qnblackcat ca0650d73a update submodules 2022-06-30 10:24:49 +07:00
qnblackcat ad29207afd v17.25.1-2.1 2022-06-29 21:06:26 +07:00
qnblackcat 64c7717b38 update submodules 2022-06-29 21:05:59 +07:00
qnblackcat 25f66162c5 update submodule 2022-06-28 15:36:23 +07:00
qnblackcat 5becdf5a85 Merge branch 'main' of https://github.com/qnblackcat/uYouPlus 2022-06-27 09:11:54 +07:00
qnblackcat 9145301cc8 support YT v17.25.1 2022-06-27 09:11:10 +07:00
qnblackcat b2b14305eb update Header.h 2022-06-27 08:50:15 +07:00
Nguyễn Đạt 02ec80256c Merge pull request #245 from ErSpieltHD/patch-1
Update German translation
2022-06-27 01:19:04 +07:00
Nguyễn Đạt b37f1e1a24 update German localization 2022-06-27 01:18:43 +07:00
ErSpieltHD 244e5a3576 German translation 2022-06-26 17:43:15 +02:00
qnblackcat 3a532cfa63 update Header.h 2022-06-26 10:12:50 +07:00
qnblackcat ef153f5d9c clean up 2022-06-26 10:11:19 +07:00
qnblackcat 4258986378 update submodules 2022-06-26 10:06:12 +07:00
qnblackcat dae08da6bf update workflow 2022-06-26 10:00:28 +07:00
qnblackcat 7f0e749030 Merge branch 'main' of https://github.com/qnblackcat/uYouPlus 2022-06-24 10:47:24 +07:00
qnblackcat c6dd02a759 update submodules 2022-06-24 10:47:11 +07:00
Nguyễn Đạt 23d745e869 Merge pull request #240 from level3tjg/main
uYou crash workarounds
2022-06-24 10:45:55 +07:00
level3tjg 2116d96e6a uYouLocal crash workaround 2022-06-23 12:42:28 -04:00
level3tjg f2cb699e3b Notification menu crash workaround 2022-06-23 12:19:22 -04:00
13 changed files with 226 additions and 159 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ jobs:
env: env:
THEOS: ${{ github.workspace }}/theos THEOS: ${{ github.workspace }}/theos
- name: Download Dylibs - name: Download uYou & prepare YouTube iPA
run: | run: |
curl "https://raw.githubusercontent.com/Muirey03/RemoteLog/master/RemoteLog.h" --output "$THEOS/include/RemoteLog.h" curl "https://raw.githubusercontent.com/Muirey03/RemoteLog/master/RemoteLog.h" --output "$THEOS/include/RemoteLog.h"
curl "https://miro92.com/repo/debs/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" --output "./main/Tweaks/uYou/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" curl "https://miro92.com/repo/debs/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" --output "./main/Tweaks/uYou/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb"
@@ -99,7 +99,7 @@ jobs:
id: build_package id: build_package
run: | run: |
cd ${{ github.workspace }}/main cd ${{ github.workspace }}/main
(cd ${{ github.workspace }}/main/Tweaks/YouPiP && sed -i '' "14s#.*#YouPiP_FRAMEWORKS = AVKit AVFoundation UIKit#g" ./Makefile) (cd ${{ github.workspace }}/main/Tweaks/YouPiP && sed -i '' "14s/$/ AVFoundation UIKit/" Makefile)
make package FINALPACKAGE=1 make package FINALPACKAGE=1
(mv "packages/$(ls -t packages | head -n1)" "packages/uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}.ipa") (mv "packages/$(ls -t packages | head -n1)" "packages/uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}.ipa")
echo "::set-output name=package::$(ls -t packages | head -n1)" echo "::set-output name=package::$(ls -t packages | head -n1)"
+12 -5
View File
@@ -12,8 +12,8 @@
@interface YTMainAppControlsOverlayView : UIView @interface YTMainAppControlsOverlayView : UIView
@end @end
@interface YTTransportControlsButtonView : UIView // @interface YTTransportControlsButtonView : UIView
@end // @end
@interface _ASCollectionViewCell : UICollectionViewCell @interface _ASCollectionViewCell : UICollectionViewCell
- (id)node; - (id)node;
@@ -23,9 +23,8 @@
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath; - (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath;
@end @end
// @interface YTPlaylistHeaderViewController : UIViewController @interface FRPSliderCell : UITableViewCell
// @property (nonatomic, strong, readwrite) UIView *downloadsButton; @end
// @end
// iOS16 fix // iOS16 fix
@interface OBPrivacyLinkButton : UIButton @interface OBPrivacyLinkButton : UIButton
@@ -37,6 +36,11 @@
displayLanguage:(NSString *)displayLanguage; displayLanguage:(NSString *)displayLanguage;
@end @end
// uYouLocal fix
@interface YTLocalPlaybackController : NSObject
- (id)activeVideo;
@end
// BigYTMiniPlayer // BigYTMiniPlayer
@interface YTMainAppVideoPlayerOverlayView : UIView @interface YTMainAppVideoPlayerOverlayView : UIView
- (UIViewController *)_viewControllerForAncestor; - (UIViewController *)_viewControllerForAncestor;
@@ -66,6 +70,9 @@
@interface _ASDisplayView : UIView @interface _ASDisplayView : UIView
@end @end
@interface YTCommentDetailHeaderCell : UIView
@end
@interface SponsorBlockSettingsController : UITableViewController @interface SponsorBlockSettingsController : UITableViewController
@end @end
+1
View File
@@ -14,6 +14,7 @@ uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uY
uYouPlus_FILES = uYouPlus.xm Settings.xm uYouPlus_FILES = uYouPlus.xm Settings.xm
uYouPlus_IPA = ./tmp/Payload/YouTube.app uYouPlus_IPA = ./tmp/Payload/YouTube.app
uYouPlus_FRAMEWORKS = UIKit uYouPlus_FRAMEWORKS = UIKit
uYouPlus_CFLAGS = -fobjc-arc
include $(THEOS)/makefiles/common.mk include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/tweak.mk include $(THEOS_MAKE_PATH)/tweak.mk
+28 -29
View File
@@ -19,7 +19,7 @@
- [HASHBANG Productions](https://github.com/hbang) for [Alderis Color Picker](https://github.com/hbang/Alderis) - a dependency of iSponsorBlock. - [HASHBANG Productions](https://github.com/hbang) for [Alderis Color Picker](https://github.com/hbang/Alderis) - a dependency of iSponsorBlock.
- [PoomSmart](https://twitter.com/poomsmart) - the developer of many tweaks used by uYouPlus, include: [NoYTPremium](https://github.com/PoomSmart/NoYTPremium/), [YouRememberCaption](https://www.ios-repo-updates.com/repository/poomsmart/package/com.ps.youremembercaption/), [YTClassicVideoQuality](https://poomsmart.github.io/repo/depictions/ytclassicvideoquality.html), [YTNoCheckLocalNetwork](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html), [YTSystemAppearance](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html), [YTAutoFullScreen](https://github.com/PoomSmart/YTAutoFullScreen/), [YTReExplore](https://github.com/PoomSmart/YTReExplore/), [IAmYouTube](https://github.com/PoomSmart/IAmYouTube), [YTUHD](https://poomsmart.github.io/repo/depictions/ytuhd.html), [YouPiP](https://poomsmart.github.io/repo/depictions/youpip.html), and [Return YouTube Dislike](https://github.com/PoomSmart/Return-YouTube-Dislikes) - [PoomSmart](https://twitter.com/poomsmart) - the developer of many tweaks used by uYouPlus, see [Version info - Download](#download) for more details.
- [level3tjg](https://twitter.com/level3tjg) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards) and [YTMiniplayerEnabler](https://github.com/level3tjg/YTMiniplayerEnabler). - [level3tjg](https://twitter.com/level3tjg) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards) and [YTMiniplayerEnabler](https://github.com/level3tjg/YTMiniplayerEnabler).
@@ -27,8 +27,6 @@
- [YouTube Extensions](https://github.com/CokePokes/YoutubeExtensions) by [CokePokes](https://github.com/CokePokes/). - [YouTube Extensions](https://github.com/CokePokes/YoutubeExtensions) by [CokePokes](https://github.com/CokePokes/).
- [Al4ise](https://github.com/Al4ise) for [Azule](https://github.com/Al4ise/Azule), a tool used to inject jailbreak tweaks into jailed iOS apps.
- [theos team](https://github.com/theos/theos) for theos & theos-jailed. - [theos team](https://github.com/theos/theos) for theos & theos-jailed.
# Features # Features
@@ -78,36 +76,37 @@
- My official AtlStore repo: https://qnblackcat.github.io/AltStore/ - My official AtlStore repo: https://qnblackcat.github.io/AltStore/
- [Open in AltStore (v17.24.4-2.1)](https://tinyurl.com/277rhd8n) - It will take a while to install because AltStore needs to download the IPA. - [Open in AltStore (v17.26.2-2.1)](https://tinyurl.com/2y86dh6b) - It will take a while to install because AltStore needs to download the IPA.
- Version info: _(last update: June 22)_ - Version info: _(last update: Jul 11)_
<details> <details>
<summary>Expand</summary> <summary>Expand</summary>
| **Tweaks/App** | **Version** | **Open source** | | **Tweaks/App** | **Developer** | **Version** | **Open source** |
| :------------: | :----------:| :-------------: | | - | - | :-: | :-: |
| **YouTube** | 17.24.4 | ✖︎ | | **YouTube** | Google Inc | 17.26.2 | ✖︎ |
| [uYou](https://github.com/MiRO92/uYou-for-YouTube) | 2.1 | ✖︎ | | [uYou](https://github.com/MiRO92/uYou-for-YouTube) | [MiRO92](https://twitter.com/miro92) | 2.1 | ✖︎ |
| [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions) | 1.2 | ✖︎ | | [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions) | [CokePokes](https://github.com/CokePokes) | 1.2 | ✖︎ |
| **Return YouTube Dislike** | 1.6.5 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) | | **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
| **iSponsorBlock** | 1.0-14 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) | | **BigYTMiniPlayer** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
| **Alderis Color Picker** | 1.2| [✔︎](https://github.com/hbang/Alderis) | | **YTNoHoverCards** | [level3tjg](https://twitter.com/level3tjg) | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) |
| **NoYTPremium** | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium) | | **YTMiniplayerEnabler** | [level3tjg](https://twitter.com/level3tjg) | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) |
| **YouRememberCaption** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) | | **YTSpeed** | [Lyvendia](https://github.com/Lyvendia) | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
| **YTClassicVideoQuality** | 1.0.1 | [✔︎](https://github.com/PoomSmart/YTClassicVideoQuality) | | **YTCastConfirm** | [JamieBerghmans](https://github.com/JamieBerghmans) | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) |
| **YTNoCheckLocalNetwork** | 1.0.2 | [✔︎](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html) | | **Alderis Color Picker** | [HASHBANG Productions](https://github.com/hbang) | 1.2| [✔︎](https://github.com/hbang/Alderis) |
| **YTNoHoverCards** | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) | | **YTUHD** | [PoomSmart](https://twitter.com/poomsmart) | 1.2.8 | [✔︎](https://github.com/PoomSmart/YTUHD) |
| **YTSystemAppearance** | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html) | | **YouPiP** | [PoomSmart](https://twitter.com/poomsmart) | 1.7.7 | [✔︎](https://github.com/PoomSmart/YouPiP) |
| **YTUHD** | 1.2.7 | [✔︎](https://github.com/PoomSmart/YTUHD) | | **IAmYouTube** | [PoomSmart](https://twitter.com/poomsmart) | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) |
| **YouPiP** | 1.7.4 | [✔︎](https://github.com/PoomSmart/YouPiP) | | **YTReExplore** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
| **IAmYouTube** | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) | | **NoYTPremium** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium) |
| **YTSpeed** | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) | | **YTNoPaidPromo** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://github.com/PoomSmart/YTNoPaidPromo) |
| **YTAutoFullScreen** | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen) | | **YTAutoFullScreen** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen) |
| **YTReExplore** | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) | | **YouRememberCaption** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) |
| **BigYTMiniPlayer** | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) | | **YTSystemAppearance** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/ytsystemappearance.html) |
| **YTCastConfirm** | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) | | **YTClassicVideoQuality** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.1 | [✔︎](https://github.com/PoomSmart/YTClassicVideoQuality) |
| **YTMiniplayerEnabler** | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) | | **Return YouTube Dislike** | [PoomSmart](https://twitter.com/poomsmart) | 1.6.5 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
| **YTNoCheckLocalNetwork** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html) |
</details> </details>
@@ -125,7 +124,7 @@ See [Installation - Wiki](https://github.com/qnblackcat/uYouPlus/wiki/Installati
</details> </details>
<details> <details>
<summary>Poomsmart</summary> <summary>PoomSmart</summary>
- Paypal: https://poomsmart.github.io/ - Paypal: https://poomsmart.github.io/
+11 -1
View File
@@ -22,6 +22,7 @@ extern BOOL hideAutoplaySwitch();
extern BOOL castConfirm(); extern BOOL castConfirm();
extern BOOL ytMiniPlayer(); extern BOOL ytMiniPlayer();
extern BOOL hidePreviousAndNextButton(); extern BOOL hidePreviousAndNextButton();
extern BOOL hidePaidPromotionCard();
// Settings // Settings
%hook YTAppSettingsPresentationData %hook YTAppSettingsPresentationData
@@ -41,6 +42,15 @@ extern BOOL hidePreviousAndNextButton();
YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"]; YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"];
NSBundle *tweakBundle = uYouPlusBundle(); NSBundle *tweakBundle = uYouPlusBundle();
YTSettingsSectionItem *hidePaidPromotionCard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PAID_PROMOTION_CARDS") titleDescription:LOC(@"HIDE_PAID_PROMOTION_CARDS_DESC")];
hidePaidPromotionCard.hasSwitch = YES;
hidePaidPromotionCard.switchVisible = YES;
hidePaidPromotionCard.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePaidPromotionCard_enabled"];
hidePaidPromotionCard.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hidePaidPromotionCard_enabled"];
return YES;
};
YTSettingsSectionItem *hidePreviousAndNextButton = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON") titleDescription:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC")]; YTSettingsSectionItem *hidePreviousAndNextButton = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON") titleDescription:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC")];
hidePreviousAndNextButton.hasSwitch = YES; hidePreviousAndNextButton.hasSwitch = YES;
hidePreviousAndNextButton.switchVisible = YES; hidePreviousAndNextButton.switchVisible = YES;
@@ -149,7 +159,7 @@ extern BOOL hidePreviousAndNextButton();
return YES; return YES;
}; };
NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hidePreviousAndNextButton, hideHoverCard, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, reExplore]]; NSMutableArray <YTSettingsSectionItem *> *sectionItems = [NSMutableArray arrayWithArray:@[autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hidePaidPromotionCard, hidePreviousAndNextButton, hideHoverCard, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, reExplore]];
[delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO]; [delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO];
} }
@@ -11,7 +11,7 @@
// Settings // Settings
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Spultasten ausblenden"; "HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Spultasten ausblenden";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Spultasten im Overlay der Videosteuerung ausblenden"; "HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Spultasten im Video ausblenden";
"YT_MINIPLAYER" = "Miniplayer für alle YouTube-Videos aktivieren"; "YT_MINIPLAYER" = "Miniplayer für alle YouTube-Videos aktivieren";
"YT_MINIPLAYER_DESC" = "Zum Beispiel bei Videos für Kinder."; "YT_MINIPLAYER_DESC" = "Zum Beispiel bei Videos für Kinder.";
@@ -25,14 +25,14 @@
"NEW_MINIPLAYER_STYLE" = "Neue Miniplayer-Leiste (BigYTMiniPlayer)"; "NEW_MINIPLAYER_STYLE" = "Neue Miniplayer-Leiste (BigYTMiniPlayer)";
"NEW_MINIPLAYER_STYLE_DESC" = "App-Neustart erforderlich."; "NEW_MINIPLAYER_STYLE_DESC" = "App-Neustart erforderlich.";
"YT_RE_EXPLORE" = "Registerkarte 'Shorts' durch Registerkarte 'Entdecken' ersetzen (YTReExplore)"; "YT_RE_EXPLORE" = "Registerkarte Shorts durch Registerkarte Entdecken ersetzen (YTReExplore)";
"YT_RE_EXPLORE_DESC" = "App-Neustart erforderlich."; "YT_RE_EXPLORE_DESC" = "App-Neustart erforderlich.";
"HIDE_SUBTITLES_BUTTON" = "Schaltfläche 'Untertitel' ausblenden"; "HIDE_SUBTITLES_BUTTON" = "Schaltfläche Untertitel ausblenden";
"HIDE_SUBTITLES_BUTTON_DESC" = "Schaltfläche 'Untertitel' im Overlay der Videosteuerung ausblenden."; "HIDE_SUBTITLES_BUTTON_DESC" = "Schaltfläche Untertitel im Video ausblenden.";
"HIDE_AUTOPLAY_SWITCH" = "Schaltfläche 'Autoplay' ausblenden"; "HIDE_AUTOPLAY_SWITCH" = "Schaltfläche Autoplay ausblenden";
"HIDE_AUTOPLAY_SWITCH_DESC" = Schaltfläche 'Autoplay' im Overlay der Videosteuerung ausblenden."; "HIDE_AUTOPLAY_SWITCH_DESC" = "Schaltfläche Autoplay im Video ausblenden.";
"AUTO_FULLSCREEN" = "Auto-Vollbild (YTAutoFullScreen)"; "AUTO_FULLSCREEN" = "Auto-Vollbild (YTAutoFullScreen)";
"AUTO_FULLSCREEN_DESC" = "Auto. Videos im Vollbild starten."; "AUTO_FULLSCREEN_DESC" = "Auto. Videos im Vollbild starten.";
@@ -36,6 +36,9 @@
"OLED_KEYBOARD" = "OLED Keyboard (Experimental)"; "OLED_KEYBOARD" = "OLED Keyboard (Experimental)";
"OLED_KEYBOARD_DESC" = "Might not working correctly in some cases. App restart is required."; "OLED_KEYBOARD_DESC" = "Might not working correctly in some cases. App restart is required.";
"HIDE_PAID_PROMOTION_CARDS" = "Hide Paid Promotion banner";
"HIDE_PAID_PROMOTION_CARDS_DESC" = "Hide the 'Includes Paid Promotions' banner in some videos.";
// YTCastConfirm // YTCastConfirm
"CASTING" = "Castings"; "CASTING" = "Castings";
"MSG_ARE_YOU_SURE" = "Are you sure you want to start casting?"; "MSG_ARE_YOU_SURE" = "Are you sure you want to start casting?";
@@ -1,53 +1,58 @@
// How to translate uYouPlus to your languate: // How to translate uYouPlus to your languate:
// //
// 1. Fork uYouPlus repo // 1. Fork uYouPlus repo
// 2. Duplicate the template.lproj folder, and edit the duplicated folder's name to your <lang_code>.lproj id. For example: ru.lproj // 2. Duplicate the template.lproj folder, and edit the duplicated folder's name to your <lang_code>.lproj id.
// for Russia. For more details, visit: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes // For example: <ru.lproj> for Russia. For more details, visit: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
// 3. Translate each line below after each = // 3. Translate each line below after each =
// 4. Open a Pull Request // 4. Open a Pull Request
// //
// If your language already exists then feel free to check it and/or improve it! // If your language already exists then feel free to check it and/or improve it!
// // You can also add your localiztion to YouPiP here, the process is the same
// Settings // https://github.com/PoomSmart/YouPiP/tree/main/layout/Library/Application%20Support/YouPiP.bundle
//
// Settings
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Hide Previous and Next button"; "HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Hide Previous and Next button";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Hide Previous and Next button in video controls overlay."; "HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Hide Previous and Next button in video controls overlay.";
"YT_MINIPLAYER" = "Enable the Miniplayer for all YouTube videos"; "YT_MINIPLAYER" = "Enable the Miniplayer for all YouTube videos";
"YT_MINIPLAYER_DESC" = "Kid videos for example."; "YT_MINIPLAYER_DESC" = "Kid videos for example.";
"CAST_CONFIRM" = "Confirm alert before casting (YTCastConfirm)"; "CAST_CONFIRM" = "Confirm alert before casting (YTCastConfirm)";
"CAST_CONFIRM_DESC" = "Show a confirm alert before casting to prevent accidentally hijacking TV."; "CAST_CONFIRM_DESC" = "Show a confirm alert before casting to prevent accidentally hijacking TV.";
"HIDE_HOVER_CARD" = "Hide End screens hover cards (YTNoHoverCards)"; "HIDE_HOVER_CARD" = "Hide End screens hover cards (YTNoHoverCards)";
"HIDE_HOVER_CARD_DESC" = "Hide creator End screens (thumbnails) at the end of videos."; "HIDE_HOVER_CARD_DESC" = "Hide creator End screens (thumbnails) at the end of videos.";
"NEW_MINIPLAYER_STYLE" = "New miniplayer bar style (BigYTMiniPlayer)"; "NEW_MINIPLAYER_STYLE" = "New miniplayer bar style (BigYTMiniPlayer)";
"NEW_MINIPLAYER_STYLE_DESC" = "App restart is required."; "NEW_MINIPLAYER_STYLE_DESC" = "App restart is required.";
"YT_RE_EXPLORE" = "Replace Shorts tab with Explore tab (YTReExplore)"; "YT_RE_EXPLORE" = "Replace Shorts tab with Explore tab (YTReExplore)";
"YT_RE_EXPLORE_DESC" = "App restart is required."; "YT_RE_EXPLORE_DESC" = "App restart is required.";
"HIDE_SUBTITLES_BUTTON" = "Hide Subtitles button"; "HIDE_SUBTITLES_BUTTON" = "Hide Subtitles button";
"HIDE_SUBTITLES_BUTTON_DESC" = "Hide the Subtitles button in video controls overlay."; "HIDE_SUBTITLES_BUTTON_DESC" = "Hide the Subtitles button in video controls overlay.";
"HIDE_AUTOPLAY_SWITCH" = "Hide Autoplay switch"; "HIDE_AUTOPLAY_SWITCH" = "Hide Autoplay switch";
"HIDE_AUTOPLAY_SWITCH_DESC" = "Hide the Autoplay switch in video controls overlay."; "HIDE_AUTOPLAY_SWITCH_DESC" = "Hide the Autoplay switch in video controls overlay.";
"AUTO_FULLSCREEN" = "Auto Full Screen (YTAutoFullScreen)"; "AUTO_FULLSCREEN" = "Auto Full Screen (YTAutoFullScreen)";
"AUTO_FULLSCREEN_DESC" = "Autoplay videos at full screen."; "AUTO_FULLSCREEN_DESC" = "Autoplay videos at full screen.";
"HIDE_HUD_MESSAGES" = "Hide HUD Messages"; "HIDE_HUD_MESSAGES" = "Hide HUD Messages";
"HIDE_HUD_MESSAGES_DESC" = "Example: CC is turned on/off, Video loop is on,..."; "HIDE_HUD_MESSAGES_DESC" = "Example: CC is turned on/off, Video loop is on,...";
"OLED_DARKMODE" = "OLED Dark mode (Experimental)"; "OLED_DARKMODE" = "OLED Dark mode (Experimental)";
"OLED_DARKMODE_DESC" = "Might not working correctly in some cases. App restart is required after you enable/disable this option."; "OLED_DARKMODE_DESC" = "Might not working correctly in some cases. App restart is required after you enable/disable this option.";
"OLED_KEYBOARD" = "OLED Keyboard (Experimental)"; "OLED_KEYBOARD" = "OLED Keyboard (Experimental)";
"OLED_KEYBOARD_DESC" = "Might not working correctly in some cases. App restart is required."; "OLED_KEYBOARD_DESC" = "Might not working correctly in some cases. App restart is required.";
// YTCastConfirm "HIDE_PAID_PROMOTION_CARDS" = "Hide Paid Promotion banner";
"CASTING" = "Castings"; "HIDE_PAID_PROMOTION_CARDS_DESC" = "Hide the 'Includes Paid Promotions' banner in some videos.";
"MSG_ARE_YOU_SURE" = "Are you sure you want to start casting?";
"MSG_YES" = "Yes"; // YTCastConfirm
"MSG_CANCEL" = "Cancel"; "CASTING" = "Castings";
"MSG_ARE_YOU_SURE" = "Are you sure you want to start casting?";
"MSG_YES" = "Yes";
"MSG_CANCEL" = "Cancel";
@@ -36,6 +36,9 @@
"OLED_KEYBOARD" = "Bàn phím OLED (Thử nghiệm)"; "OLED_KEYBOARD" = "Bàn phím OLED (Thử nghiệm)";
"OLED_KEYBOARD_DESC" = "Tính năng này có thể không hoạt động tốt trong một vài trường hợp. Cần khởi động lại ứng dụng."; "OLED_KEYBOARD_DESC" = "Tính năng này có thể không hoạt động tốt trong một vài trường hợp. Cần khởi động lại ứng dụng.";
"HIDE_PAID_PROMOTION_CARDS" = "Ẩn popup quảng cáo được trả tiền";
"HIDE_PAID_PROMOTION_CARDS_DESC" = "Ẩn popup 'Chứa nội dung được trả tiền để quảng cáo' trong một số video.";
// YTCastConfirm // YTCastConfirm
"CASTING" = "Truyền video"; "CASTING" = "Truyền video";
"MSG_ARE_YOU_SURE" = "Bạn có muốn bắt đầu truyền video không?"; "MSG_ARE_YOU_SURE" = "Bạn có muốn bắt đầu truyền video không?";
+113 -74
View File
@@ -13,6 +13,8 @@
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h" #import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h" #import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
#import "Tweaks/YouTubeHeader/ASCollectionView.h" #import "Tweaks/YouTubeHeader/ASCollectionView.h"
#import "Tweaks/YouTubeHeader/YTPlayerOverlay.h"
#import "Tweaks/YouTubeHeader/YTPlayerOverlayProvider.h"
// Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f // Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f
NSBundle *uYouPlusBundle() { NSBundle *uYouPlusBundle() {
@@ -66,6 +68,9 @@ BOOL castConfirm() {
BOOL ytMiniPlayer() { BOOL ytMiniPlayer() {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"]; return [[NSUserDefaults standardUserDefaults] boolForKey:@"ytMiniPlayer_enabled"];
} }
BOOL hidePaidPromotionCard(){
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hidePaidPromotionCard_enabled"];
}
# pragma mark - Tweaks # pragma mark - Tweaks
// YTMiniPlayerEnabler: https://github.com/level3tjg/YTMiniplayerEnabler/ // YTMiniPlayerEnabler: https://github.com/level3tjg/YTMiniplayerEnabler/
@@ -91,7 +96,6 @@ BOOL ytMiniPlayer() {
if (hidePreviousAndNextButton()) { if (hidePreviousAndNextButton()) {
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES; MSHookIvar<YTMainAppControlsOverlayView *>(self, "_nextButton").hidden = YES;
MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES; MSHookIvar<YTMainAppControlsOverlayView *>(self, "_previousButton").hidden = YES;
// YouTube love beta testing :/
// MSHookIvar<YTTransportControlsButtonView *>(self, "_nextButtonView").hidden = YES; // MSHookIvar<YTTransportControlsButtonView *>(self, "_nextButtonView").hidden = YES;
// MSHookIvar<YTTransportControlsButtonView *>(self, "_previousButtonView").hidden = YES; // MSHookIvar<YTTransportControlsButtonView *>(self, "_previousButtonView").hidden = YES;
} }
@@ -169,6 +173,22 @@ BOOL ytMiniPlayer() {
- (void)decorateContext:(id)arg1 { %orig(nil); } - (void)decorateContext:(id)arg1 { %orig(nil); }
%end %end
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/94
%hook YTELMView
%new
- (id)entry {
return nil;
}
%end
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/140
%hook YTLocalPlaybackController
%new
- (id)activeVideoController {
return [self activeVideo];
}
%end
// YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality // YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality
%hook YTVideoQualitySwitchControllerFactory %hook YTVideoQualitySwitchControllerFactory
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder { - (id)videoQualitySwitchControllerWithParentResponder:(id)responder {
@@ -217,20 +237,11 @@ BOOL ytMiniPlayer() {
- (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {} - (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {}
%end %end
// Enable Shorts scroll bar - level3tjg - https://reddit.com/r/jailbreak/comments/v29yvk/_/iasl1l0/ // Enable Shorts scroll bar - @level3tjg - https://reddit.com/r/jailbreak/comments/v29yvk/_/iasl1l0/
%hook YTReelPlayerViewControllerSub %hook YTReelPlayerViewController
- (BOOL)shouldEnablePlayerBar { return YES; } - (BOOL)shouldEnablePlayerBar { return YES; }
%end %end
// Hide the download playlist button of uYou cuz it's broken ?!
// Why aren't you working?? :/
// %hook YTPlaylistHeaderViewController
// - (void)viewDidLoad {
// %orig;
// self.downloadsButton.hidden = YES;
// }
// %end
// Workaround for issue #54 // Workaround for issue #54
%hook YTMainAppVideoPlayerOverlayViewController %hook YTMainAppVideoPlayerOverlayViewController
- (void)updateRelatedVideos { - (void)updateRelatedVideos {
@@ -239,7 +250,7 @@ BOOL ytMiniPlayer() {
} }
%end %end
// Hide YouTube Shorts banner in Home page? - MiRO92 - YTNoShorts: https://github.com/MiRO92/YTNoShorts // Hide YouTube Shorts banner in Home page? - @MiRO92 - YTNoShorts: https://github.com/MiRO92/YTNoShorts
%hook YTAsyncCollectionView %hook YTAsyncCollectionView
- (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath { - (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = %orig; UICollectionViewCell *cell = %orig;
@@ -252,12 +263,44 @@ BOOL ytMiniPlayer() {
} }
return %orig; return %orig;
} }
%new %new
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath { - (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath {
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]]; [self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
} }
%end %end
// uYou's slide settings?
%hook FRPSliderCell
- (void)didMoveToWindow {
%orig;
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
MSHookIvar<UILabel *>(self, "_lLabel").textColor = [UIColor whiteColor];
MSHookIvar<UILabel *>(self, "_rLabel").textColor = [UIColor whiteColor];
MSHookIvar<UILabel *>(self, "_cLabel").textColor = [UIColor whiteColor];
}
}
%end
// YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo
%hook YTMainAppVideoPlayerOverlayViewController
- (void)setPaidContentWithPlayerData:(id)data {
if (hidePaidPromotionCard()) {}
else { return %orig; }
}
- (void)playerOverlayProvider:(YTPlayerOverlayProvider *)provider didInsertPlayerOverlay:(YTPlayerOverlay *)overlay {
if ([[overlay overlayIdentifier] isEqualToString:@"player_overlay_paid_content"] && hidePaidPromotionCard()) return;
%orig;
}
%end
%hook YTInlineMutedPlaybackPlayerOverlayViewController
- (void)setPaidContentWithPlayerData:(id)data {
if (hidePaidPromotionCard()) {}
else { return %orig; }
}
%end
# pragma mark - IAmYouTube - https://github.com/PoomSmart/IAmYouTube/ # pragma mark - IAmYouTube - https://github.com/PoomSmart/IAmYouTube/
%hook YTVersionUtils %hook YTVersionUtils
+ (NSString *)appName { return YT_NAME; } + (NSString *)appName { return YT_NAME; }
@@ -314,38 +357,42 @@ BOOL ytMiniPlayer() {
%end %end
# pragma mark - OLED dark mode by BandarHL # pragma mark - OLED dark mode by BandarHL
UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:1.0];
UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%group gOLED %group gOLED
%hook YTCommonColorPalette %hook YTCommonColorPalette
- (UIColor *)brandBackgroundSolid { - (UIColor *)brandBackgroundSolid {
if (self.pageStyle == 1) { if (self.pageStyle == 1) {
return oledColor; return [UIColor blackColor];
} }
return %orig; return %orig;
} }
- (UIColor *)brandBackgroundPrimary { - (UIColor *)brandBackgroundPrimary {
if (self.pageStyle == 1) { if (self.pageStyle == 1) {
return oledColor; return [UIColor blackColor];
} }
return %orig; return %orig;
} }
- (UIColor *)brandBackgroundSecondary { - (UIColor *)brandBackgroundSecondary {
if (self.pageStyle == 1) { if (self.pageStyle == 1) {
return oledColor; return [[UIColor blackColor] colorWithAlphaComponent:0.9];
}
return %orig;
}
- (UIColor *)raisedBackground {
if (self.pageStyle == 1) {
return raisedColor;
} }
return %orig; return %orig;
} }
- (UIColor *)staticBrandBlack { - (UIColor *)staticBrandBlack {
if (self.pageStyle == 1) { if (self.pageStyle == 1) {
return oledColor; return [UIColor blackColor];
} }
return %orig; return %orig;
} }
- (UIColor *)generalBackgroundA { - (UIColor *)generalBackgroundA {
if (self.pageStyle == 1) { if (self.pageStyle == 1) {
return oledColor; return [UIColor blackColor];
} }
return %orig; return %orig;
} }
@@ -355,16 +402,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTAccountPanelBodyViewController %hook YTAccountPanelBodyViewController
- (UIColor *)backgroundColor:(NSInteger)pageStyle { - (UIColor *)backgroundColor:(NSInteger)pageStyle {
if (pageStyle == 1) { if (pageStyle == 1) {
return oledColor; return [UIColor blackColor];
}
return %orig;
}
%end
%hook YTInnerTubeCollectionViewController
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
if (pageStyle == 1) {
return oledColor;
} }
return %orig; return %orig;
} }
@@ -373,8 +411,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
// Explore // Explore
%hook ASScrollView %hook ASScrollView
- (void)didMoveToWindow { - (void)didMoveToWindow {
if (isDarkMode()) { %orig;
%orig; if (isDarkMode()) {
self.backgroundColor = [UIColor clearColor]; self.backgroundColor = [UIColor clearColor];
} }
} }
@@ -383,8 +421,8 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
// Your videos // Your videos
%hook ASCollectionView %hook ASCollectionView
- (void)didMoveToWindow { - (void)didMoveToWindow {
%orig;
if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) { if (isDarkMode() && [self.nextResponder isKindOfClass:%c(_ASDisplayView)]) {
%orig;
self.superview.backgroundColor = [UIColor clearColor]; self.superview.backgroundColor = [UIColor clearColor];
} }
} }
@@ -395,7 +433,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
- (void)viewDidLoad { - (void)viewDidLoad {
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) { if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
%orig; %orig;
self.tableView.backgroundColor = oledColor; self.tableView.backgroundColor = [UIColor blackColor];
} else { return %orig; } } else { return %orig; }
} }
%end %end
@@ -404,26 +442,16 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
- (void)viewDidLoad { - (void)viewDidLoad {
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) { if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
%orig; %orig;
self.view.backgroundColor = oledColor; self.view.backgroundColor = [UIColor blackColor];
} else { return %orig; } } else { return %orig; }
} }
%end %end
// YT Miniplayer
%hook YTWatchMiniBarView
- (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) {
return %orig([UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.9]);
}
return %orig;
}
%end
// Search View // Search View
%hook YTSearchBarView %hook YTSearchBarView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
@@ -433,7 +461,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTSearchBoxView %hook YTSearchBoxView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
@@ -443,7 +471,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTCommentView %hook YTCommentView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
@@ -452,7 +480,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTCreateCommentAccessoryView %hook YTCreateCommentAccessoryView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
@@ -461,7 +489,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTCreateCommentTextView %hook YTCreateCommentTextView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
@@ -473,6 +501,15 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
} }
%end %end
%hook YTCommentDetailHeaderCell
- (void)didMoveToWindow {
%orig;
if (isDarkMode()) {
self.subviews[2].backgroundColor = [UIColor blackColor];
}
}
%end
%hook YTFormattedStringLabel // YT is werid... %hook YTFormattedStringLabel // YT is werid...
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
@@ -486,7 +523,7 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YCHLiveChatActionPanelView %hook YCHLiveChatActionPanelView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
@@ -495,28 +532,28 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook YTEmojiTextView %hook YTEmojiTextView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig([UIColor blackColor]);
} }
return %orig; return %orig;
} }
%end %end
// Nasty stuff :/ // Others
%hook _ASDisplayView %hook _ASDisplayView
- (void)didMoveToWindow { - (void)didMoveToWindow {
%orig; %orig;
if (isDarkMode()) { if (isDarkMode()) {
if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = [UIColor clearColor]; } if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = raisedColor; }
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = oledColor; } if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = [UIColor blackColor]; }
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = oledColor; } if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = [UIColor blackColor]; }
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = oledColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = [UIColor blackColor]; }
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = oledColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = raisedColor; }
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = oledColor; } 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 = oledColor; } 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 = oledColor; } 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 = oledColor; } 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 = oledColor; } 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.superview.backgroundColor = oledColor; } if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = [UIColor blackColor]; }
} }
} }
%end %end
@@ -525,25 +562,27 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook ASWAppSwitchingSheetHeaderView %hook ASWAppSwitchingSheetHeaderView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig(raisedColor);
} }
return %orig;
} }
%end %end
%hook ASWAppSwitchingSheetFooterView %hook ASWAppSwitchingSheetFooterView
- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) { if (isDarkMode()) {
return %orig(oledColor); return %orig(raisedColor);
} }
return %orig;
} }
%end %end
%hook ASWAppSwitcherCollectionViewCell %hook ASWAppSwitcherCollectionViewCell
- (void)didMoveToWindow { - (void)didMoveToWindow {
%orig;
if (isDarkMode()) { if (isDarkMode()) {
%orig; self.subviews[1].backgroundColor = raisedColor;
self.subviews[1].backgroundColor = oledColor; self.superview.backgroundColor = raisedColor;
self.superview.backgroundColor = oledColor;
} }
} }
%end %end
@@ -554,28 +593,28 @@ UIColor* oledColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
%hook UIPredictionViewController %hook UIPredictionViewController
- (void)loadView { - (void)loadView {
%orig; %orig;
[self.view setBackgroundColor:oledColor]; [self.view setBackgroundColor:[UIColor blackColor]];
} }
%end %end
%hook UICandidateViewController %hook UICandidateViewController
- (void)loadView { - (void)loadView {
%orig; %orig;
[self.view setBackgroundColor:oledColor]; [self.view setBackgroundColor:[UIColor blackColor]];
} }
%end %end
%hook UIKeyboardDockView %hook UIKeyboardDockView
- (void)didMoveToWindow { - (void)didMoveToWindow {
%orig; %orig;
self.backgroundColor = oledColor; self.backgroundColor = [UIColor blackColor];
} }
%end %end
%hook UIKeyboardLayoutStar %hook UIKeyboardLayoutStar
- (void)didMoveToWindow { - (void)didMoveToWindow {
%orig; %orig;
self.backgroundColor = oledColor; self.backgroundColor = [UIColor blackColor];
} }
%end %end