Skip to content

Commit 7be2cff

Browse files
committed
synced @arichorn change
1 parent b1ba894 commit 7be2cff

File tree

7 files changed

+75
-63
lines changed

7 files changed

+75
-63
lines changed

CercubePlus.xm

+36-1
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,46 @@ static BOOL IsEnabled(NSString *key) {
204204
- (BOOL)shouldShowUpgradeDialog { return NO;}
205205
%end
206206

207-
// Disable YouTube Ads - @arichorn
207+
// Disable YouTube Ads - @poomsmart
208+
%hook YTDataUtils
209+
+ (id)spamSignalsDictionaryWithoutIDFA { return nil; }
210+
%end
211+
208212
%hook YTHotConfig
209213
- (BOOL)disableAfmaIdfaCollection { return NO; }
210214
%end
211215

216+
BOOL isAd(id node) {
217+
if ([node isKindOfClass:NSClassFromString(@"YTVideoWithContextNode")]
218+
&& [node respondsToSelector:@selector(parentResponder)]
219+
&& [[(YTVideoWithContextNode *)node parentResponder] isKindOfClass:NSClassFromString(@"YTAdVideoElementsCellController")])
220+
return YES;
221+
if ([node isKindOfClass:NSClassFromString(@"ELMCellNode")]) {
222+
NSString *description = [[[node controller] owningComponent] description];
223+
if ([description containsString:@"brand_promo"]
224+
|| [description containsString:@"statement_banner"]
225+
|| [description containsString:@"product_carousel"]
226+
|| [description containsString:@"product_engagement_panel"]
227+
|| [description containsString:@"product_item"]
228+
|| [description containsString:@"text_search_ad"]
229+
|| [description containsString:@"square_image_layout"] // install app ad
230+
|| [description containsString:@"feed_ad_metadata"])
231+
return YES;
232+
}
233+
return NO;
234+
}
235+
236+
%hook YTAsyncCollectionView
237+
- (id)collectionView:(id)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
238+
_ASCollectionViewCell *cell = %orig;
239+
if ([cell isKindOfClass:NSClassFromString(@"_ASCollectionViewCell")]
240+
&& [cell respondsToSelector:@selector(node)]
241+
&& isAd([cell node]))
242+
[self deleteItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
243+
return cell;
244+
}
245+
%end
246+
212247
// Disable Wifi Related Settings - @arichorn
213248
%group gDisableWifiRelatedSettings
214249
%hook YTSettingsSectionItemManager

Header.h

-3
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@
109109
@end
110110

111111
// YTNoShorts
112-
@interface ELMCellNode
113-
@end
114-
115112
@interface _ASCollectionViewCell : UICollectionViewCell
116113
- (id)node;
117114
@end

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARCHS = arm64
44
MODULES = jailed
55
FINALPACKAGE = 1
66
CODESIGN_IPA = 0
7-
PACKAGE_VERSION = 18.22.9-5.3.11
7+
PACKAGE_VERSION = 18.25.1-5.3.11
88

99
TWEAK_NAME = CercubePlus
1010
DISPLAY_NAME = YouTube

Source/Settings.xm

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ static BOOL IsEnabled(NSString *key) {
1212
static int GetSelection(NSString *key) {
1313
return [[NSUserDefaults standardUserDefaults] integerForKey:key];
1414
}
15-
static int colorContrastMode() {
16-
return [[NSUserDefaults standardUserDefaults] integerForKey:@"lcmColor"];
17-
}
15+
1816
static int appVersionSpoofer() {
1917
return [[NSUserDefaults standardUserDefaults] integerForKey:@"versionSpoofer"];
2018
}

lang/CercubePlus.bundle/en.lproj/Localizable.strings

+13-19
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"AUTO_FULLSCREEN" = "Auto Full Screen (YTAutoFullScreen)";
99
"AUTO_FULLSCREEN_DESC" = "Autoplay videos at full screen.";
1010

11-
"TAP_TO_SKIP" = "Disable tap to skip";
12-
"TAP_TO_SKIP_DESC" = "Disable the tap to skip feature in the video player. App restart is required.";
11+
"DISABLE_DOUBLE_TAP_TO_SKIP" = "Disable double tap to skip";
12+
"DISABLE_DOUBLE_TAP_TO_SKIP_DESC" = "Disables the double tap to skip gestures in the video player. App restart is required.";
1313

1414
"SNAP_TO_CHAPTER" = "Disable snap to chapter";
1515
"SNAP_TO_CHAPTER_DESC" = "Disable auto snap to chapter when seeking in videos. App restart is required.";
@@ -68,9 +68,6 @@
6868
"HIDE_RIGHT_PANEL" = "Hide the right panel in fullscreen mode";
6969
"HIDE_RIGHT_PANEL_DESC" = "App restart is required.";
7070

71-
"DONT_EAT_MY_CONTENT" = "Prevent Notch/Island on 2:1 Video Content (DontEatMyContent)";
72-
"DONT_EAT_MY_CONTENT_DESC" = "Prevent the notch/Dynamic Island from munching on 2:1 video content in YouTube. App restart is required.";
73-
7471
"HIDE_HEATWAVES" = "Hide Heatwaves";
7572
"HIDE_HEATWAVES_DESC" = "Hides the Heatwaves in the video player. App restart is required.";
7673

@@ -107,6 +104,11 @@
107104
"HIDE_SUBSCRIPTIONS" = "Hide Subscriptions button";
108105
"HIDE_SUBSCRIPTIONS_DESC" = "Hide Subscriptions button which shows up when paused.";
109106

107+
// Version Spoofer
108+
"APP_VERSION_SPOOFER" = "Enable App Version Spoofer";
109+
"APP_VERSION_SPOOFER_DESC" = "Enable this to use the Version Spoofer and select your perferred version below. App restart is required.";
110+
"VERSION_SPOOFER_TITLE" = "Version Spoofer Picker";
111+
110112
// Theme
111113
"THEME_OPTIONS" = "Theme Options";
112114

@@ -126,29 +128,21 @@
126128
"LOW_CONTRAST_MODE" = "Low Contrast Mode";
127129
"LOW_CONTRAST_MODE_DESC" = "This option will Low Contrast of the texts and buttons just like how the old YouTube Interface was. App restart is required.";
128130

129-
"LCM_CHOOSE_COLOR" = "Low contrast text color";
130-
"DEFAULT_UI" = "Default";
131-
"RED_UI" = "Red UI";
132-
"BLUE_UI" = "Blue UI";
133-
"GREEN_UI" = "Green UI";
134-
"YELLOW_UI" = "Yellow UI";
135-
"ORANGE_UI" = "Orange UI";
136-
"PURPLE_UI" = "Purple UI";
137-
"VIOLET_UI" = "Violet UI";
138-
"PINK_UI" = "Pink UI";
139-
140131
// Miscellaneous
141132
"MISCELLANEOUS" = "Miscellaneous";
142133

143134
"ENABLE_YT_STARTUP_ANIMATION" = "Enable YouTube startup animation";
144135
"ENABLE_YT_STARTUP_ANIMATION_DESC" = "";
145136

146-
"HIDE_YOUTUBE_LOGO" = "Hide YouTube Logo";
147-
"HIDE_YOUTUBE_LOGO_DESC" = "this will Hide the YouTube Logo on the top left of the Interface. App restart is required.";
137+
"STICK_NAVIGATION_BAR" = "Stick Navigation Bar";
138+
"STICK_NAVIGATION_BAR_DESC" = "Enable to make the Navigation Bar stay on the App when scrolling.";
148139

149140
"HIDE_CHIP_BAR" = "Hide the Upper bar";
150141
"HIDE_CHIP_BAR_DESC" = "Hide Upper bar in the Home feeds (Trends, Music, Gaming...) and Subscription feeds (All videos, Continue watching...).";
151142

143+
"HIDE_YOUTUBE_LOGO" = "Hide YouTube Logo";
144+
"HIDE_YOUTUBE_LOGO_DESC" = "this will Hide the YouTube Logo on the top left of the Interface. App restart is required.";
145+
152146
"HIDE_MODERN_INTERFACE" = "Hide Modern Interface (YTNoModernUI)";
153147
"HIDE_MODERN_INTERFACE_DESC" = "Toggle this on to hide any Modern Element added by YouTube. Removes Ambient Mode, Rounded Design & More. App restart is required.";
154148

@@ -199,4 +193,4 @@
199193
"YT_SPEED_DESC" = "Enable YTSpeed to have more Playback Speed Options. App restart is required.";
200194

201195
"ENABLE_FLEX" = "Enable FLEX";
202-
"ENABLE_FLEX_DESC" = "Enable FLEX for debugging (not recommended). Leave this off unless you know what you are doing.";
196+
"ENABLE_FLEX_DESC" = "Enable FLEX for debugging (not recommended). Leave this off unless you know what you are doing.";

lang/CercubePlus.bundle/ja.lproj/Localizable.strings

+12-18
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"AUTO_FULLSCREEN" = "自動フルスクリーン (YTAutoFullScreen)";
99
"AUTO_FULLSCREEN_DESC" = "フルスクリーンでビデオを自動再生します";
1010

11-
"TAP_TO_SKIP" = "タップしてスキップする機能を無効化";
12-
"TAP_TO_SKIP_DESC" = "ビデオプレーヤーでタップしてスキップする機能を無効にします。アプリの再起動が必要です";
11+
"DISABLE_DOUBLE_TAP_TO_SKIP" = "Disable double tap to skip";
12+
"DISABLE_DOUBLE_TAP_TO_SKIP_DESC" = "Disables the double tap to skip gestures in the video player. App restart is required.";
1313

1414
"SNAP_TO_CHAPTER" = "チャプターへのスナップを無効化";
1515
"SNAP_TO_CHAPTER_DESC" = "動画でシークする際にチャプターへの自動スナップを無効にします。アプリの再起動が必要です";
@@ -68,9 +68,6 @@
6868
"HIDE_RIGHT_PANEL" = "フルスクリーンモードで右パネルを非表示";
6969
"HIDE_RIGHT_PANEL_DESC" = "アプリの再起動が必要です";
7070

71-
"DONT_EAT_MY_CONTENT" = "2:1比率の動画とノッチ/Dynamic Islandの最適化 (DontEatMyContent)";
72-
"DONT_EAT_MY_CONTENT_DESC" = "2:1比率の動画とノッチ/Dynamic Islandが干渉するのを防ぎます。アプリの再起動が必要です";
73-
7471
"HIDE_HEATWAVES" = "ヒートウェーブを非表示";
7572
"HIDE_HEATWAVES_DESC" = "ビデオプレーヤーでヒートウェーブを非表示にします。アプリの再起動が必要です";
7673

@@ -107,6 +104,11 @@
107104
"HIDE_SUBSCRIPTIONS" = "チャンネル登録ボタンを非表示";
108105
"HIDE_SUBSCRIPTIONS_DESC" = "一時停止時に表示されるチャンネル登録ボタンを非表示にします";
109106

107+
// Version Spoofer
108+
"APP_VERSION_SPOOFER" = "Enable App Version Spoofer";
109+
"APP_VERSION_SPOOFER_DESC" = "Enable this to use the Version Spoofer and select your perferred version below. App restart is required.";
110+
"VERSION_SPOOFER_TITLE" = "Version Spoofer Picker";
111+
110112
// Theme
111113
"THEME_OPTIONS" = "テーマオプション";
112114

@@ -126,29 +128,21 @@
126128
"LOW_CONTRAST_MODE" = "低コントラストモード";
127129
"LOW_CONTRAST_MODE_DESC" = "このオプションは、テキストとボタンのコントラストを以前のYouTubeインターフェイスのように低くします。アプリの再起動が必要です";
128130

129-
"LCM_CHOOSE_COLOR" = "低コントラストのテキストカラー";
130-
"DEFAULT_UI" = "デフォルト";
131-
"RED_UI" = "赤色のUI";
132-
"BLUE_UI" = "青色のUI";
133-
"GREEN_UI" = "緑色のUI";
134-
"YELLOW_UI" = "黄色のUI";
135-
"ORANGE_UI" = "オレンジ色のUI";
136-
"PURPLE_UI" = "紫色のUI";
137-
"VIOLET_UI" = "バイオレットUI";
138-
"PINK_UI" = "ピンク色のUI";
139-
140131
// Miscellaneous
141132
"MISCELLANEOUS" = "その他";
142133

143134
"ENABLE_YT_STARTUP_ANIMATION" = "YouTube起動時のアニメーションを有効化";
144135
"ENABLE_YT_STARTUP_ANIMATION_DESC" = "";
145136

146-
"HIDE_YOUTUBE_LOGO" = "YouTubeロゴを非表示";
147-
"HIDE_YOUTUBE_LOGO_DESC" = "インターフェイスの左上にあるYouTubeロゴを非表示にします。アプリの再起動が必要です";
137+
"STICK_NAVIGATION_BAR" = "Stick Navigation Bar";
138+
"STICK_NAVIGATION_BAR_DESC" = "Enable to make the Navigation Bar stay on the App when scrolling.";
148139

149140
"HIDE_CHIP_BAR" = "トップバーを非表示";
150141
"HIDE_CHIP_BAR_DESC" = "ホーム(トレンド,音楽,ゲーム など)と\n登録チャンネル(すべてのビデオ,視聴を続ける 等)リボンのトップバーを非表示にします。\nアプリの再起動が必要です";
151142

143+
"HIDE_YOUTUBE_LOGO" = "YouTubeロゴを非表示";
144+
"HIDE_YOUTUBE_LOGO_DESC" = "インターフェイスの左上にあるYouTubeロゴを非表示にします。アプリの再起動が必要です";
145+
152146
"HIDE_MODERN_INTERFACE" = "モダンインターフェイスを非表示 (YTNoModernUI)";
153147
"HIDE_MODERN_INTERFACE_DESC" = "YouTubeによって追加されたモダンな要素を隠すにはこれを有効にしてください。アンビエントモード,丸みを帯びたデザインなどを削除します。\nアプリの再起動が必要です";
154148

lang/CercubePlus.bundle/template.lproj/Localizable.strings

+12-18
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
2323
"AUTO_FULLSCREEN" = "Auto Full Screen (YTAutoFullScreen)";
2424
"AUTO_FULLSCREEN_DESC" = "Autoplay videos at full screen.";
2525

26-
"TAP_TO_SKIP" = "Disable tap to skip";
27-
"TAP_TO_SKIP_DESC" = "Disable the tap to skip feature in the video player. App restart is required.";
26+
"DISABLE_DOUBLE_TAP_TO_SKIP" = "Disable double tap to skip";
27+
"DISABLE_DOUBLE_TAP_TO_SKIP_DESC" = "Disables the double tap to skip gestures in the video player. App restart is required.";
2828

2929
"SNAP_TO_CHAPTER" = "Disable snap to chapter";
3030
"SNAP_TO_CHAPTER_DESC" = "Disable auto snap to chapter when seeking in videos. App restart is required.";
@@ -83,9 +83,6 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
8383
"HIDE_RIGHT_PANEL" = "Hide the right panel in fullscreen mode";
8484
"HIDE_RIGHT_PANEL_DESC" = "App restart is required.";
8585

86-
"DONT_EAT_MY_CONTENT" = "Prevent Notch/Island on 2:1 Video Content (DontEatMyContent)";
87-
"DONT_EAT_MY_CONTENT_DESC" = "Prevent the notch/Dynamic Island from munching on 2:1 video content in YouTube. App restart is required.";
88-
8986
"HIDE_HEATWAVES" = "Hide Heatwaves";
9087
"HIDE_HEATWAVES_DESC" = "Hides the Heatwaves in the video player. App restart is required.";
9188

@@ -122,6 +119,11 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
122119
"HIDE_SUBSCRIPTIONS" = "Hide Subscriptions button";
123120
"HIDE_SUBSCRIPTIONS_DESC" = "Hide Subscriptions button which shows up when paused.";
124121

122+
// Version Spoofer
123+
"APP_VERSION_SPOOFER" = "Enable App Version Spoofer";
124+
"APP_VERSION_SPOOFER_DESC" = "Enable this to use the Version Spoofer and select your perferred version below. App restart is required.";
125+
"VERSION_SPOOFER_TITLE" = "Version Spoofer Picker";
126+
125127
// Theme
126128
"THEME_OPTIONS" = "Theme Options";
127129

@@ -141,29 +143,21 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
141143
"LOW_CONTRAST_MODE" = "Low Contrast Mode";
142144
"LOW_CONTRAST_MODE_DESC" = "This option will Low Contrast of the texts and buttons just like how the old YouTube Interface was. App restart is required.";
143145

144-
"LCM_CHOOSE_COLOR" = "Low contrast text color";
145-
"DEFAULT_UI" = "Default";
146-
"RED_UI" = "Red UI";
147-
"BLUE_UI" = "Blue UI";
148-
"GREEN_UI" = "Green UI";
149-
"YELLOW_UI" = "Yellow UI";
150-
"ORANGE_UI" = "Orange UI";
151-
"PURPLE_UI" = "Purple UI";
152-
"VIOLET_UI" = "Violet UI";
153-
"PINK_UI" = "Pink UI";
154-
155146
// Miscellaneous
156147
"MISCELLANEOUS" = "Miscellaneous";
157148

158149
"ENABLE_YT_STARTUP_ANIMATION" = "Enable YouTube startup animation";
159150
"ENABLE_YT_STARTUP_ANIMATION_DESC" = "";
160151

161-
"HIDE_YOUTUBE_LOGO" = "Hide YouTube Logo";
162-
"HIDE_YOUTUBE_LOGO_DESC" = "this will Hide the YouTube Logo on the top left of the Interface. App restart is required.";
152+
"STICK_NAVIGATION_BAR" = "Stick Navigation Bar";
153+
"STICK_NAVIGATION_BAR_DESC" = "Enable to make the Navigation Bar stay on the App when scrolling.";
163154

164155
"HIDE_CHIP_BAR" = "Hide the Upper bar";
165156
"HIDE_CHIP_BAR_DESC" = "Hide Upper bar in the Home feeds (Trends, Music, Gaming...) and Subscription feeds (All videos, Continue watching...).";
166157

158+
"HIDE_YOUTUBE_LOGO" = "Hide YouTube Logo";
159+
"HIDE_YOUTUBE_LOGO_DESC" = "this will Hide the YouTube Logo on the top left of the Interface. App restart is required.";
160+
167161
"HIDE_MODERN_INTERFACE" = "Hide Modern Interface (YTNoModernUI)";
168162
"HIDE_MODERN_INTERFACE_DESC" = "Toggle this on to hide any Modern Element added by YouTube. Removes Ambient Mode, Rounded Design & More. App restart is required.";
169163

0 commit comments

Comments
 (0)