Skip to content

Commit e92fe42

Browse files
Replace YouTube's download with uYou's
1 parent d8af7ce commit e92fe42

25 files changed

+110
-2
lines changed

Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "استخدام مؤشر تغيير الصوت الخاص بالنظام";
6767
"STOCK_VOLUME_HUD_DESC" = "إظهار مؤشر تغيير الصوت الرسمي الخاص بـ iOS بدلاً من مؤشر يوتيوب";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 أزرار التحكم على الطبقة فوق الفيديو";
7174

Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video Controls Overlay Options";
7174

Localizations/uYouPlus.bundle/de.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Standard iOS Lautstärke HUD aktivieren";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video Controls Overlay Optionen";
7174

Localizations/uYouPlus.bundle/el.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
7174

Localizations/uYouPlus.bundle/en.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
7174

Localizations/uYouPlus.bundle/es.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Utiliza el HUD de volumen de iOS";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opciones de superposición de controles de vídeo";
7174

Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Utiliser l'affichage iOS du volume par défaut";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Options de superposition des contrôles vidéo";
7174

Localizations/uYouPlus.bundle/he.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
7174

Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use iOS stock volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
7174

Localizations/uYouPlus.bundle/it.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use iOS stock volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opzioni Sovrimpressione (Overlay) Video";
7174

Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "標準の音量HUDを利用する";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 動画コントロールのオーバーレイ設定";
7174

Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "iOS 기본 음량 표시기 사용";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 비디오 재생 오버레이 설정";
7174

Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
7174

Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Użyj systemowego paska głośności";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opcje wyglądu odtwarzacza video";
7174

Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Usar o HUD de volume padrão do iOS";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opções de Sobreposição de Controles de Vídeo";
7174

Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
7174

Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Использовать стоковый слайдер грмкости iOS";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Параметры элементов оверлея видеоплеера";
7174

Localizations/uYouPlus.bundle/template.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
8181
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
8282
"STOCK_VOLUME_HUD_DESC" = "";
8383

84+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
85+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
86+
8487
// Video controls overlay options
8588
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";
8689

Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Mevcut iOS baş yukarı göstergesi(HUD) alanını kullan";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video Kontrolleri Kaplaması Seçenekleri";
7174

Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "Sử dụng thanh âm lượng mặc định của iOS";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Tùy chọn hiển thị trong trình phát video";
7174

Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "使用 iOS 自带音量指示";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 视频播放器控制界面选项";
7174

Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
"STOCK_VOLUME_HUD" = "使用 iOS 內建的音量 HUD";
6767
"STOCK_VOLUME_HUD_DESC" = "";
6868

69+
"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
70+
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";
71+
6972
// Video controls overlay options
7073
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 影片懸浮控制選項";
7174

Sources/uYouPlus.h

+11
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919

2020
// #import <YouTubeHeader/YTISectionListRenderer.h> // Hide search ads by @PoomSmart - https://github.com/PoomSmart/YouTube-X
2121

22+
// Replace YouTube's download with uYou's
23+
#import <YouTubeHeader/ELMPBShowActionSheetCommand.h>
24+
#import <YouTubeHeader/ELMPBElement.h>
25+
#import <YouTubeHeader/ELMPBProperties.h>
26+
#import <YouTubeHeader/ELMPBIdentifierProperties.h>
27+
#import <YouTubeHeader/YTMainAppControlsOverlayView.h>
28+
@interface YTMainAppControlsOverlayView(uYou)
29+
- (void)uYou;
30+
@end
31+
2232
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
2333
#define IS_ENABLED(k) [[NSUserDefaults standardUserDefaults] boolForKey:k]
2434
#define APP_THEME_IDX [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"]
@@ -36,6 +46,7 @@ static NSString *const kHideRemixButton = @"hideRemixButton_enabled";
3646
static NSString *const kHideClipButton = @"hideClipButton_enabled";
3747
static NSString *const kHideDownloadButton = @"hideDownloadButton_enabled";
3848
static NSString *const kStockVolumeHUD = @"stockVolumeHUD_enabled";
49+
static NSString *const kReplaceYTDownloadWithuYou = @"kReplaceYTDownloadWithuYou_enabled";
3950
// Video controls overlay
4051
static NSString *const kHideAutoplaySwitch = @"hideAutoplaySwitch_enabled";
4152
static NSString *const kHideCC = @"hideCC_enabled";

Sources/uYouPlus.xm

+32-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
7676
}
7777

7878
%hook ASCollectionView
79-
8079
- (CGSize)sizeForElement:(ASCollectionElement *)element {
8180
if ([self.accessibilityIdentifier isEqualToString:@"id.video.scrollable_action_bar"]) {
8281
ASCellNode *node = [element node];
@@ -95,7 +94,6 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
9594
}
9695
return %orig;
9796
}
98-
9997
%end
10098

10199
// Use stock iOS volume HUD
@@ -106,6 +104,35 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
106104
}
107105
%end
108106

107+
// Replace YouTube's download with uYou's
108+
YTMainAppControlsOverlayView *controlsOverlayView;
109+
%hook YTMainAppControlsOverlayView
110+
- (id)initWithDelegate:(id)arg1 {
111+
controlsOverlayView = %orig;
112+
return controlsOverlayView;
113+
}
114+
%end
115+
%hook YTElementsDefaultSheetController
116+
+ (void)showSheetController:(id)arg1 showCommand:(id)arg2 commandContext:(id)arg3 handler:(id)arg4 {
117+
if (IS_ENABLED(kReplaceYTDownloadWithuYou) && [arg2 isKindOfClass:%c(ELMPBShowActionSheetCommand)]) {
118+
ELMPBShowActionSheetCommand *showCommand = (ELMPBShowActionSheetCommand *)arg2;
119+
NSArray *listOptions = [showCommand listOptionArray];
120+
for (ELMPBElement *element in listOptions) {
121+
ELMPBProperties *properties = [element properties];
122+
ELMPBIdentifierProperties *identifierProperties = [properties firstSubmessage];
123+
NSString *identifier = [identifierProperties identifier];
124+
if ([identifier containsString:@"offline_upsell_dialog"]) {
125+
if ([controlsOverlayView respondsToSelector:@selector(uYou)]) {
126+
[controlsOverlayView uYou];
127+
}
128+
return;
129+
}
130+
}
131+
}
132+
%orig;
133+
}
134+
%end
135+
109136
# pragma mark - Video control overlay options
110137

111138
%hook YTMainAppControlsOverlayView
@@ -421,4 +448,7 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
421448
if (![allKeys containsObject:kGoogleSigninFix]) {
422449
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kGoogleSigninFix];
423450
}
451+
if (![allKeys containsObject:kReplaceYTDownloadWithuYou]) {
452+
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kReplaceYTDownloadWithuYou];
453+
}
424454
}

Sources/uYouPlusSettings.xm

+1
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ extern NSBundle *uYouPlusBundle();
295295
SWITCH(LOC(@"HIDE_CLIP_BUTTON"), LOC(@"HIDE_CLIP_BUTTON_DESC"), kHideClipButton);
296296
SWITCH(LOC(@"HIDE_DOWNLOAD_BUTTON"), LOC(@"HIDE_DOWNLOAD_BUTTON_DESC"), kHideDownloadButton);
297297
SWITCH(LOC(@"STOCK_VOLUME_HUD"), LOC(@"STOCK_VOLUME_HUD_DESC"), kStockVolumeHUD);
298+
SWITCH(LOC(@"REPLACE_YT_DOWNLOAD_WITH_UYOU"), LOC(@"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC"), kReplaceYTDownloadWithuYou);
298299

299300
# pragma mark - Video controls overlay options
300301
SECTION_HEADER(LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS"));

0 commit comments

Comments
 (0)