From 14a7123b39dc0412aee3e334a9df34120da947eb Mon Sep 17 00:00:00 2001 From: arichornloverALT <157071384+arichornloverALT@users.noreply.github.com> Date: Mon, 29 Jul 2024 08:15:18 -0500 Subject: [PATCH] =?UTF-8?q?Added=20=E2=80=9CCopy=20Settings=E2=80=9D=20&?= =?UTF-8?q?=20=E2=80=9CPaste=20Settings=E2=80=9D=20buttons=20(#1497)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added Copy Settings & Paste Settings buttons * Fix Strings for Paste Settings * new localizations --------- Co-authored-by: arichornlover <78001398+arichornlover@users.noreply.github.com> --- .../ar.lproj/Localizable.strings | 6 ++ .../cz.lproj/Localizable.strings | 6 ++ .../de.lproj/Localizable.strings | 6 ++ .../el.lproj/Localizable.strings | 6 ++ .../en.lproj/Localizable.strings | 6 ++ .../es.lproj/Localizable.strings | 6 ++ .../fr.lproj/Localizable.strings | 6 ++ .../he.lproj/Localizable.strings | 6 ++ .../hu.lproj/Localizable.strings | 6 ++ .../it.lproj/Localizable.strings | 6 ++ .../ja.lproj/Localizable.strings | 6 ++ .../ko.lproj/Localizable.strings | 6 ++ .../nl.lproj/Localizable.strings | 6 ++ .../pl.lproj/Localizable.strings | 6 ++ .../pt.lproj/Localizable.strings | 6 ++ .../ro.lproj/Localizable.strings | 6 ++ .../ru.lproj/Localizable.strings | 6 ++ .../template.lproj/Localizable.strings | 6 ++ .../tr.lproj/Localizable.strings | 6 ++ .../vi.lproj/Localizable.strings | 6 ++ .../zh_cn.lproj/Localizable.strings | 6 ++ .../zh_tw.lproj/Localizable.strings | 6 ++ Sources/uYouPlusSettings.xm | 60 +++++++++++++++++++ 23 files changed, 192 insertions(+) diff --git a/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings index 8a60a1b8d1..ef86173f6c 100644 --- a/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings index 720b8a6cba..5d293eb49c 100644 --- a/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings index 9b61019dd8..c1dd9ef59a 100755 --- a/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/de.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings index 90badf8574..adca8d5400 100644 --- a/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/el.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings index 1caf78edc6..347ce8d081 100644 --- a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings index e55fe7f7fe..92b90199fe 100644 --- a/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/es.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Informar de un problema"; "ADD_TITLE" = "Añada aquí su título..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Salir de Youtube"; "RESTART_YOUTUBE" = "Reinicia YouTube para aplicar los cambios"; diff --git a/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings index 84c7dffc9d..e8c023c8de 100644 --- a/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings index b4b557874c..c89d303178 100644 --- a/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/he.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings index 9f09fae10f..d819d9586e 100644 --- a/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings index 1e97a3e543..7bf62fe1ce 100644 --- a/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/it.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings index 9d66544e28..c4d9012756 100644 --- a/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "不具合を報告"; "ADD_TITLE" = "タイトルをここに追加..."; +"COPY_SETTINGS" = "設定をコピー"; +"COPY_SETTINGS_DESC" = "現在のすべての設定をクリップボードにコピーします"; +"PASTE_SETTINGS" = "設定を貼り付け"; +"PASTE_SETTINGS_DESC" = "クリップボードから設定を貼り付けて適用します"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "YouTubeを終了"; "RESTART_YOUTUBE" = "変更を適用するためにYouTubeを再起動"; diff --git a/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings index 46b6ea3705..cfa435662f 100644 --- a/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings index 6c51a9aea7..f3a9a77118 100644 --- a/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings index 8c4b67750c..4188b9a30e 100644 --- a/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Zgłoś błąd"; "ADD_TITLE" = "Podaj tutaj tytuł..."; +"COPY_SETTINGS" = "Kopiuj ustawienia"; +"COPY_SETTINGS_DESC" = "Kopiuj ustawienia do schowka"; +"PASTE_SETTINGS" = "Wklej ustawienia"; +"PASTE_SETTINGS_DESC" = "Wklej ustawienia ze schowka i zastosuj je"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Zamknij aplikację"; "RESTART_YOUTUBE" = "Zrestartuj YouTube aby wprowadzić zmiany"; diff --git a/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings index dc7401e0dc..ee1f4cec69 100644 --- a/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Informar um problema"; "ADD_TITLE" = "Adicione seu título aqui..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Sair do YouTube"; "RESTART_YOUTUBE" = "Reinicie o YouTube para aplicar as alterações"; diff --git a/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings index 0feae9c274..43b4a526ba 100644 --- a/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings index b079ab40c2..ba5fc1d670 100644 --- a/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings index 9aa7f0640a..680f046d66 100644 --- a/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/template.lproj/Localizable.strings @@ -22,6 +22,12 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings index 108d98527c..00c044ded9 100644 --- a/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Ayarları Kopyala"; +"COPY_SETTINGS_DESC" = "Tüm mevcut ayarları panoya kopyala"; +"PASTE_SETTINGS" = "Ayarları Yapıştır"; +"PASTE_SETTINGS_DESC" = "Panodaki ayarları yapıştır ve uygula"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings index a4bbcca789..2c7eacce0e 100644 --- a/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Báo lỗi"; "ADD_TITLE" = "Thêm tiêu đề lỗi ở đây..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Đóng YouTube"; "RESTART_YOUTUBE" = "Khởi động lại YouTube để áp dụng các thay đổi"; diff --git a/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings index 310f0cdb2f..26f35c2a4d 100644 --- a/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings index 7acdc6915e..e40926a210 100644 --- a/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings @@ -7,6 +7,12 @@ "REPORT_AN_ISSUE" = "Report an issue"; "ADD_TITLE" = "Add your title here..."; +"COPY_SETTINGS" = "Copy Settings"; +"COPY_SETTINGS_DESC" = "Copy all current settings to the clipboard"; +"PASTE_SETTINGS" = "Paste Settings"; +"PASTE_SETTINGS_DESC" = "Paste settings from clipboard and apply"; +"PASTE_SETTINGS_ALERT" = "Are you sure you want to paste the settings?"; + "QUIT_YOUTUBE" = "Quit YouTube"; "RESTART_YOUTUBE" = "Restart YouTube to apply changes"; diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 86530f3063..2af9860e02 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -9,6 +9,15 @@ #define SWITCH_ITEM2(t, d, k) [sectionItems addObject:[YTSettingsSectionItemClass switchItemWithTitle:t titleDescription:d accessibilityIdentifier:nil switchOn:IS_ENABLED(k) switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:k];SHOW_RELAUNCH_YT_SNACKBAR;return YES;} settingItemId:0]] +NSArray *copyKeys = @[ +/* MAIN Player Keys */ @"slideToSeek_enabled", @"snapToChapter_enabled", @"pinchToZoom_enabled", @"ytMiniPlayer_enabled", @"hideRemixButton_enabled", @"hideClipButton_enabled", @"hideDownloadButton_enabled", @"stockVolumeHUD_enabled", +/* MAIN Button Keys */ @"hideAutoplaySwitch_enabled", @"hideCC_enabled", @"hideHUD_enabled", @"hidePaidPromotionCard_enabled", @"hideChannelWatermark_enabled", @"redProgressBar_enabled", @"hideHoverCards_enabled", @"hideRightPanel_enabled", +/* MAIN Shorts Keys */ @"hideBuySuperThanks_enabled", @"hideSubcriptions_enabled", +/* MAIN Misc Keys */ @"hideiSponsorBlockButton_enabled", @"disableHints_enabled", @"ytStartupAnimation_enabled", @"hideChipBar_enabled", @"hidePlayNextInQueue_enabled", @"iPhoneLayout_enabled", @"bigYTMiniPlayer_enabled", @"reExplore_enabled", @"flex_enabled", +/* TWEAK uYou Keys */ @"showedWelcomeVC", @"hideShortsTab", @"hideCreateTab", @"hideCastButton", @"relatedVideosAtTheEndOfYTVideos", @"removeYouTubeAds", @"backgroundPlayback", @"disableAgeRestriction", @"iPadLayout", @"noSuggestedVideoAtEnd", @"shortsProgressBar", @"hideShortsCells", @"removeShortsCell", @"startupPage", +/* TWEAK YTUHD Keys */ @"EnableVP9", @"AllVP9" +]; + static const NSInteger uYouPlusSection = 500; @interface YTSettingsSectionItemManager (uYouPlus) @@ -72,6 +81,57 @@ extern NSBundle *uYouPlusBundle(); ]; [sectionItems addObject:bug]; + YTSettingsSectionItem *copySettings = [%c(YTSettingsSectionItem) + itemWithTitle:LOC(@"COPY_SETTINGS") + titleDescription:LOC(@"COPY_SETTINGS_DESC") + accessibilityIdentifier:nil + detailTextBlock:nil + selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + NSMutableString *settingsString = [NSMutableString string]; + for (NSString *key in copyKeys) { + if ([userDefaults objectForKey:key]) { + NSString *value = [userDefaults objectForKey:key]; + [settingsString appendFormat:@"%@: %@\n", key, value]; + } + } + [[UIPasteboard generalPasteboard] setString:settingsString]; + // Show a confirmation message or perform some other action here + return YES; + } + ]; + [sectionItems addObject:copySettings]; + + YTSettingsSectionItem *pasteSettings = [%c(YTSettingsSectionItem) + itemWithTitle:LOC(@"PASTE_SETTINGS") + titleDescription:LOC(@"PASTE_SETTINGS_DESC") + accessibilityIdentifier:nil + detailTextBlock:nil + selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + UIAlertController *confirmPasteAlert = [UIAlertController alertControllerWithTitle:LOC(@"PASTE_SETTINGS_ALERT") message:nil preferredStyle:UIAlertControllerStyleAlert]; + [confirmPasteAlert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; + [confirmPasteAlert addAction:[UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + NSString *settingsString = [[UIPasteboard generalPasteboard] string]; + if (settingsString.length > 0) { + NSArray *lines = [settingsString componentsSeparatedByString:@"\n"]; + for (NSString *line in lines) { + NSArray *components = [line componentsSeparatedByString:@": "]; + if (components.count == 2) { + NSString *key = components[0]; + NSString *value = components[1]; + [[NSUserDefaults standardUserDefaults] setObject:value forKey:key]; + } + } + [settingsViewController reloadData]; + SHOW_RELAUNCH_YT_SNACKBAR; + } + }]]; + [settingsViewController presentViewController:confirmPasteAlert animated:YES completion:nil]; + return YES; + } + ]; + [sectionItems addObject:pasteSettings]; + YTSettingsSectionItem *exitYT = [%c(YTSettingsSectionItem) itemWithTitle:LOC(@"QUIT_YOUTUBE") titleDescription:nil