mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-29 13:20:19 +02:00
feat(spoof-app-version): user selectable version to spoof
This commit is contained in:
parent
ed32eddd71
commit
c4e6c6e688
@ -83,17 +83,5 @@ class PatchOptions : ResourcePatch {
|
||||
description = "The background color of the dark theme. Can be a hex color or a resource reference."
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* Client Spoofing Version
|
||||
*/
|
||||
internal var clientSpoofVersion: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "clientSpoofVersion",
|
||||
default = "17.28.35",
|
||||
title = "Old YouTube version to override",
|
||||
description = "Type the client version to spoof when Old Layout is enabled"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,11 @@ class SpoofAppVersionPatch : ResourcePatch {
|
||||
|
||||
GeneralVersionSpoofPatch.injectSpoof("$MISC_PATH/VersionOverridePatch;->getVersionOverride(Ljava/lang/String;)Ljava/lang/String;")
|
||||
|
||||
/**
|
||||
* Copy arrays
|
||||
*/
|
||||
context.copyXmlNode("youtube/spoofappversion/host", "values/arrays.xml", "resources")
|
||||
|
||||
/**
|
||||
* Add settings
|
||||
*/
|
||||
|
@ -86,6 +86,11 @@
|
||||
This will change the appearance of the app, but unknown side effects may occur
|
||||
If later turned off, the old UI may remain until clear the app data"</string>
|
||||
<string name="revanced_spoof_app_version_title">Spoof app version</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_1">17.41.37 - Playlists shelf in library tab follows old layout</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_2">17.30.34 - Restore old UI layout</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_3">17.06.35 - Enable sorting videos by oldest</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_4">16.08.35 - Restore explore tab</string>
|
||||
<string name="revanced_spoof_app_version_target_title">Spoof app version target</string>
|
||||
<string name="revanced_enable_old_quality_layout_summary_off">New style quality settings are shown</string>
|
||||
<string name="revanced_enable_old_quality_layout_summary_on">Old style quality settings are shown</string>
|
||||
<string name="revanced_enable_old_quality_layout_title">Enable old style quality layout</string>
|
||||
|
@ -430,7 +430,8 @@
|
||||
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_experimental_flag" />
|
||||
<!-- SETTINGS: SPOOF_APP_VERSION
|
||||
<SwitchPreference android:title="@string/revanced_spoof_app_version_title" android:key="revanced_spoof_app_version" android:defaultValue="false" android:summary="@string/revanced_spoof_app_version_summary" />SETTINGS: SPOOF_APP_VERSION -->
|
||||
<SwitchPreference android:title="@string/revanced_spoof_app_version_title" android:key="revanced_spoof_app_version" android:defaultValue="false" android:summary="@string/revanced_spoof_app_version_summary" />
|
||||
<ListPreference android:title="@string/revanced_spoof_app_version_target_title" android:key="revanced_spoof_app_version_target" android:entries="@array/revanced_spoof_app_version_target_entry" android:defaultValue="17.30.34" android:entryValues="@array/revanced_spoof_app_version_target_entry_value" android:dependency="revanced_spoof_app_version" />SETTINGS: SPOOF_APP_VERSION -->
|
||||
|
||||
<!-- SETTINGS: LAYOUT_SWITCH
|
||||
<SwitchPreference android:title="@string/revanced_enable_tablet_layout_title" android:key="revanced_enable_tablet_layout" android:summary="@string/revanced_enable_tablet_layout_summary" android:defaultValue="false" />
|
||||
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="revanced_spoof_app_version_target_entry">
|
||||
<item>@string/revanced_spoof_app_version_target_entry_1</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_2</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_3</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_4</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_entry_value">
|
||||
<item>17.41.37</item>
|
||||
<item>17.30.34</item>
|
||||
<item>17.06.35</item>
|
||||
<item>16.08.35</item>
|
||||
</string-array>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user