From 7b0098cff54b17c6db85262a1a4f8146b4fbc322 Mon Sep 17 00:00:00 2001 From: Foxster Date: Fri, 26 Jan 2024 19:26:57 -0800 Subject: [PATCH] Add option to hide iSponsorBlock --- .../uYouPlus.bundle/ar.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/cz.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/de.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/el.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/en.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/es.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/fr.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/he.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/hu.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/it.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/ja.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/ko.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/nl.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/pl.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/pt.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/ro.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/ru.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/template.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/tr.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/vi.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/zh_cn.lproj/Localizable.strings | 1 + .../uYouPlus.bundle/zh_tw.lproj/Localizable.strings | 1 + Sources/uYouPlus.xm | 9 +++++++++ Sources/uYouPlusSettings.xm | 1 + 24 files changed, 32 insertions(+) diff --git a/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings index c9f2c93e0f..98afe0a2a6 100644 --- a/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 خيارات متنوعة"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "التأكيد قبل البث (أداة YTCastConfirm)"; "CAST_CONFIRM_DESC" = "إظهار تنبيه للتأكيد قبل البث، من أجل منع البث للتلفاز عن طريق الخطأ."; diff --git a/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings index 112c1ec6eb..2cc27bf9b3 100644 --- a/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Zobrazit potvrzení před začátkem sdílení obrazu (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Zobrazí potvrzení aby se zamezilo nechtěnému sdílení do televize."; diff --git a/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings index 964d56de5f..062223a64a 100755 --- a/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Sonstiges"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Warnung vor TV-Übertragungen (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Zeigt eine Warnung an, um eine ausversehene TV-Übertragung zu verhindern."; diff --git a/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings index 4900ab2bfb..9e35b24d3b 100644 --- a/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock"; "CAST_CONFIRM" = "Επιβεβαιωτικό μήνυμα πριν γίνει Cast(YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Να φανεί ένα επιβεβαιωτικό μήνυμα πριν γίνει cast για να αποτρεπτεί η καταλάθως σύνδεση στην τηλεόραση."; diff --git a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings index 6810ef7a68..f29a94d17c 100644 --- a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "YTCastConfirm"; "CAST_CONFIRM_DESC" = "Shows a confirmation alert before casting"; diff --git a/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings index 1616804061..59b1f2f925 100644 --- a/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Varios"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Alerta de confirmación antes de Enviar contenido (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Mostrar una alerta de confirmación antes de Enviar contenido para prevenir el secuestro accidental del TV."; diff --git a/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings index 6390957755..bbf8c0bab7 100644 --- a/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Divers"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Confirmer l'alerte avant le casting (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Afficher une alerte de confirmation avant de lancer le casting afin d'éviter de déclencher accidentellement la télévision"; diff --git a/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings index f97dc4f29e..408e6041ee 100644 --- a/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "התראת אישור לפני שידור לטלוויזיה (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "הצג התראת אישור לפני שידור לטלוויזיה כדי למנוע לחיצה בטעות."; diff --git a/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings index db6a011ed9..bf67f56bc6 100644 --- a/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Megerősítés átküldés előtt (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Az átküldés előtt mutasson megerősítő figyelmeztetést, hogy megakadályozza a TV véletlen eltérítését."; diff --git a/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings index 373fa8877d..805ed51815 100644 --- a/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Varie"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Avviso di conferma prima della condivisione su TV (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Mostra un avviso di conferma prima della condivisione per evitar e di irrompere accidentalmente sulla TV."; diff --git a/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings index e5735729d8..49c0cee78d 100644 --- a/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 その他"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "YTCastConfirm"; "CAST_CONFIRM_DESC" = "キャスト前に確認の警告を表示します。"; diff --git a/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings index 74783fd0a0..f181ec9c84 100644 --- a/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 기타 설정"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "TV 전송 알림 (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "의도치 않게 TV로 영상을 전송하지 않도록 보내기 전에 확인 메시지를 표시합니다."; diff --git a/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings index cae73eefd7..2aec0f9534 100644 --- a/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Bevestig casten (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Toon een melding na het drukken op de cast knop om te voorkomen dat je per ongeluk cast."; diff --git a/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings index 775ee0fa22..acdd36c9d6 100644 --- a/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Alert przed przesyłaniem (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Pokaż alert przed przesyłaniem aby nie łączyć się przez przypadek z telewizorem."; diff --git a/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings index e03763fa81..752ff1bc8b 100644 --- a/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Diversos"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Alerta de confirmação antes de transmitir (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Mostra um alerta de confirmação antes da transmissão para evitar o sequestro acidental da TV."; diff --git a/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings index 6b526c2e77..59907f1bf4 100644 --- a/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Alertă de confirmare înainte de proiectare (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Afișează o alertă de confirmare înainte de a proiecta, pentru a preveni deturnarea accidentală a TV-ului."; diff --git a/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings index eafd76e050..a4de90dade 100644 --- a/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Другое"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Подтверждение «Трансляции» (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Спрашивать подтверждение перед началом трансляции во избежание случайных подключений к ТВ."; diff --git a/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings index be1b786cfe..6c4763772a 100644 --- a/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings @@ -115,6 +115,7 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "MISCELLANEOUS" = "🔎 Miscellaneous"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "YTCastConfirm"; "CAST_CONFIRM_DESC" = "Shows a confirmation alert before casting"; diff --git a/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings index c1b1284452..0e6bc9c79f 100644 --- a/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Diğer"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Yayınlamadan önce uyarıyı onayla (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "TV'nin yanlışlıkla ele geçirilmesini önlemek için yayınlamadan önce bir onay uyarısı gösterir."; diff --git a/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings index 7c4d8119e6..44a82811b7 100644 --- a/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 Cài đặt khác"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "Xác nhận trước khi cast video (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "Hiện hộp thoại xác nhận trước khi cast video sang TV để tránh vô tình chiếm quyền điều khiển TV."; diff --git a/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings index 00e3082fec..ba039f074e 100644 --- a/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 其它选项"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "投屏前确认 (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "在投屏前显示确认对话框以防意外劫屏。"; diff --git a/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings index a7cc9b0e31..b13e9ebeee 100644 --- a/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings @@ -100,6 +100,7 @@ "MISCELLANEOUS" = "🔎 雜項"; "HIDE_UYOU" = "Hide uYou tab"; +"HIDE_ISPONSORBLOCK" = "Hide iSponsorBlock button"; "CAST_CONFIRM" = "投放前確認 (YTCastConfirm)"; "CAST_CONFIRM_DESC" = "在投放前顯示確認訊息,以防止家人幹樵。"; diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 4fbc52ca75..2af91de374 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -155,6 +155,15 @@ NSBundle *tweakBundle = uYouPlusBundle(); # pragma mark - Miscellaneous +// Hide iSponsorBlock +%hook YTRightNavigationButtons +- (void)setSponsorBlockButton:(id)sponsorBlockButton { + if (IS_ENABLED(@"hideiSponsorBlockButton_enabled")) + return; + %orig; +} +%end + // YTCastConfirm // See YTCastConfirm.xm diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index b343489634..711890dfb6 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -195,6 +195,7 @@ extern NSBundle *uYouPlusBundle(); SECTION_HEADER(LOC(@"MISCELLANEOUS")); SWITCH_ITEM2(LOC(@"HIDE_UYOU"), nil, @"hideUYouTab_enabled"); + SWITCH_ITEM2(LOC(@"HIDE_ISPONSORBLOCK"), nil, @"hideiSponsorBlockButton_enabled"); SWITCH_ITEM(LOC(@"CAST_CONFIRM"), LOC(@"CAST_CONFIRM_DESC"), @"castConfirm_enabled"); SWITCH_ITEM(LOC(@"DISABLE_HINTS"), LOC(@"DISABLE_HINTS_DESC"), @"disableHints_enabled"); SWITCH_ITEM(LOC(@"ENABLE_YT_STARTUP_ANIMATION"), LOC(@"ENABLE_YT_STARTUP_ANIMATION_DESC"), @"ytStartupAnimation_enabled");