mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-10 03:13:56 +01:00
Compare commits
4 Commits
v2.177.1-d
...
v2.178.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21adab5ef3 | ||
|
|
2e7e231e7d | ||
|
|
ae67a762ff | ||
|
|
66118829b3 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
||||
# [2.178.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.177.1-dev.2...v2.178.0-dev.1) (2023-06-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **google-recorder:** add `remove-device-restrictions` patch ([ef96ed1](https://github.com/revanced/revanced-patches/commit/ef96ed124e12091dde34124eabd8be9f2bb9280c))
|
||||
|
||||
## [2.177.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.177.1-dev.1...v2.177.1-dev.2) (2023-06-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube:** separate `hide-ads` to `hide-layout-components` patch ([7e0417f](https://github.com/revanced/revanced-patches/commit/7e0417f6728fa7b79a9d8cbcfd3ccba484a5567d))
|
||||
|
||||
## [2.177.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.177.0...v2.177.1-dev.1) (2023-06-14)
|
||||
|
||||
|
||||
|
||||
81
README.md
81
README.md
@@ -35,6 +35,7 @@ The official ReVanced Patches.
|
||||
| `hide-filter-bar` | Hides the filter bar in video feeds. | 18.19.35 |
|
||||
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.19.35 |
|
||||
| `hide-info-cards` | Hides info cards in videos. | 18.19.35 |
|
||||
| `hide-layout-components` | Hides general layout components. | 18.19.35 |
|
||||
| `hide-load-more-button` | Hides the button under videos that loads similar videos. | 18.19.35 |
|
||||
| `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | 18.19.35 |
|
||||
| `hide-player-overlay` | Hides the dark background overlay from the player when player controls are visible. | all |
|
||||
@@ -324,6 +325,30 @@ The official ReVanced Patches.
|
||||
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `tv.trakt.trakt`](https://play.google.com/store/apps/details?id=tv.trakt.trakt)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | 4.6377 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.vsco.cam`](https://play.google.com/store/apps/details?id=com.vsco.cam)
|
||||
<details>
|
||||
|
||||
@@ -340,22 +365,6 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.candylink.openvpn`](https://play.google.com/store/apps/details?id=com.candylink.openvpn)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks premium features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
|
||||
<details>
|
||||
|
||||
@@ -364,22 +373,6 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | 4.6377 |
|
||||
</details>
|
||||
|
||||
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
|
||||
<details>
|
||||
|
||||
@@ -388,14 +381,6 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
|
||||
</details>
|
||||
|
||||
### [📦 `tv.trakt.trakt`](https://play.google.com/store/apps/details?id=tv.trakt.trakt)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.wakdev.apps.nfctools.se`](https://play.google.com/store/apps/details?id=com.wakdev.apps.nfctools.se)
|
||||
<details>
|
||||
|
||||
@@ -404,6 +389,22 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.candylink.openvpn`](https://play.google.com/store/apps/details?id=com.candylink.openvpn)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks premium features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
|
||||
<details>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.177.1-dev.1
|
||||
version = 2.178.0-dev.1
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
package app.revanced.patches.googlerecorder.restrictions.fingereprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object OnApplicationCreateFingerprint : MethodFingerprint(
|
||||
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
||||
customFingerprint = custom@{ methodDef, classDef ->
|
||||
if (methodDef.name != "onCreate") return@custom false
|
||||
|
||||
classDef.type.endsWith("RecorderApplication;")
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
package app.revanced.patches.googlerecorder.restrictions.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.googlerecorder.restrictions.fingereprints.OnApplicationCreateFingerprint
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("remove-device-restrictions")
|
||||
@Description("Removes restrictions from using the app on any device.")
|
||||
@Version("0.0.1")
|
||||
class RemoveDeviceRestrictions : BytecodePatch(
|
||||
listOf(OnApplicationCreateFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
OnApplicationCreateFingerprint.result?.let {
|
||||
val featureStringIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
||||
|
||||
it.mutableMethod.apply {
|
||||
// Remove check for device restrictions.
|
||||
removeInstructions(featureStringIndex - 2, 5)
|
||||
|
||||
val featureAvailableRegister = getInstruction<OneRegisterInstruction>(featureStringIndex).registerA
|
||||
|
||||
// Override "isPixelDevice()" to return true.
|
||||
addInstruction(featureStringIndex, "const/4 v$featureAvailableRegister, 0x1")
|
||||
}
|
||||
} ?: return OnApplicationCreateFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -7,14 +7,15 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.*
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.ad.general.annotation.HideAdsCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen
|
||||
|
||||
@DependsOn(
|
||||
dependencies = [
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class,
|
||||
ResourceMappingPatch::class
|
||||
@@ -24,189 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.P
|
||||
@Version("0.0.1")
|
||||
class HideAdsResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_gray_separator",
|
||||
StringResource("revanced_hide_gray_separator_title", "Hide gray separator"),
|
||||
StringResource("revanced_hide_gray_separator_summary_on", "Gray separators are hidden"),
|
||||
StringResource("revanced_hide_gray_separator_summary_off", "Gray separators are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_guidelines",
|
||||
StringResource("revanced_hide_channel_guidelines_title", "Hide channel guidelines"),
|
||||
StringResource(
|
||||
"revanced_hide_channel_guidelines_summary_on",
|
||||
"Channel guidelines are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_channel_guidelines_summary_off",
|
||||
"Channel guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_chapter_teaser",
|
||||
StringResource(
|
||||
"revanced_hide_chapter_teaser_title",
|
||||
"Hide chapter teaser under videos"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_chapter_teaser_summary_on",
|
||||
"Chapter teasers are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_chapter_teaser_summary_off",
|
||||
"Chapter teasers are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_merchandise_banners",
|
||||
StringResource("revanced_hide_merchandise_banners_title", "Hide merchandise banners"),
|
||||
StringResource("revanced_hide_merchandise_banners_summary_on", "Merchandise banners are hidden"),
|
||||
StringResource("revanced_hide_merchandise_banners_summary_off", "Merchandise banners are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_community_posts",
|
||||
StringResource("revanced_hide_community_posts_title", "Hide community posts"),
|
||||
StringResource("revanced_hide_community_posts_summary_on", "Community posts are hidden"),
|
||||
StringResource("revanced_hide_community_posts_summary_off", "Community posts are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_compact_banner",
|
||||
StringResource("revanced_hide_compact_banner_title", "Hide compact banners"),
|
||||
StringResource("revanced_hide_compact_banner_summary_on", "Compact banners are hidden"),
|
||||
StringResource("revanced_hide_compact_banner_summary_off", "Compact banners are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_products_banner",
|
||||
StringResource("revanced_hide_products_banner_title", "Hide banner to view products"),
|
||||
StringResource("revanced_hide_products_banner_summary_on", "Banner is hidden"),
|
||||
StringResource("revanced_hide_products_banner_summary_off", "Banner is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_web_search_results",
|
||||
StringResource("revanced_hide_web_search_results_title", "Hide web search results"),
|
||||
StringResource("revanced_hide_web_search_results_summary_on", "Web search results are hidden"),
|
||||
StringResource("revanced_hide_web_search_results_summary_off", "Web search results are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_movies_section",
|
||||
StringResource("revanced_hide_movies_section_title", "Hide movies section"),
|
||||
StringResource("revanced_hide_movies_section_summary_on", "Movies section is hidden"),
|
||||
StringResource("revanced_hide_movies_section_summary_off", "Movies section is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_feed_survey",
|
||||
StringResource("revanced_hide_feed_survey_title", "Hide feed surveys"),
|
||||
StringResource("revanced_hide_feed_survey_summary_on", "Feed surveys are hidden"),
|
||||
StringResource("revanced_hide_feed_survey_summary_off", "Feed surveys are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_community_guidelines",
|
||||
StringResource("revanced_hide_community_guidelines_title", "Hide community guidelines"),
|
||||
StringResource(
|
||||
"revanced_hide_community_guidelines_summary_on",
|
||||
"Community guidelines are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_community_guidelines_summary_off",
|
||||
"Community guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_subscribers_community_guidelines",
|
||||
StringResource(
|
||||
"revanced_hide_subscribers_community_guidelines_title",
|
||||
"Hide subscribers community guidelines"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_subscribers_community_guidelines_summary_on",
|
||||
"Subscribers community guidelines are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_subscribers_community_guidelines_summary_off",
|
||||
"Subscribers community guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_member_shelf",
|
||||
StringResource("revanced_hide_channel_member_shelf_title", "Hide channel member shelf"),
|
||||
StringResource(
|
||||
"revanced_hide_channel_member_shelf_summary_on",
|
||||
"Channel member shelf is hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_channel_member_shelf_summary_off",
|
||||
"Channel member shelf is shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_emergency_box",
|
||||
StringResource("revanced_hide_emergency_box_title", "Hide emergency boxes"),
|
||||
StringResource("revanced_hide_emergency_box_summary_on", "Emergency boxes are hidden"),
|
||||
StringResource("revanced_hide_emergency_box_summary_off", "Emergency boxes are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_info_panels",
|
||||
StringResource("revanced_hide_info_panels_title", "Hide info panels"),
|
||||
StringResource("revanced_hide_info_panels_summary_on", "Info panels are hidden"),
|
||||
StringResource("revanced_hide_info_panels_summary_off", "Info panels are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_medical_panels",
|
||||
StringResource("revanced_hide_medical_panels_title", "Hide medical panels"),
|
||||
StringResource("revanced_hide_medical_panels_summary_on", "Medical panels are hidden"),
|
||||
StringResource("revanced_hide_medical_panels_summary_off", "Medical panels are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_bar",
|
||||
StringResource("revanced_hide_channel_bar_title", "Hide channel bar"),
|
||||
StringResource("revanced_hide_channel_bar_summary_on", "Channel bar is hidden"),
|
||||
StringResource("revanced_hide_channel_bar_summary_off", "Channel bar is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_quick_actions",
|
||||
StringResource("revanced_hide_quick_actions_title", "Hide quick actions in fullscreen"),
|
||||
StringResource("revanced_hide_quick_actions_summary_on", "Quick actions are hidden"),
|
||||
StringResource("revanced_hide_quick_actions_summary_off", "Quick actions are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_related_videos",
|
||||
StringResource("revanced_hide_related_videos_title", "Hide related videos in quick actions"),
|
||||
StringResource("revanced_hide_related_videos_summary_on", "Related videos are hidden"),
|
||||
StringResource("revanced_hide_related_videos_summary_off", "Related videos are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_image_shelf",
|
||||
StringResource("revanced_hide_image_shelf", "Hide image shelf in search results"),
|
||||
StringResource("revanced_hide_image_shelf_summary_on", "Image shelf is hidden"),
|
||||
StringResource("revanced_hide_image_shelf_summary_off", "Image shelf is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_audio_track_button",
|
||||
StringResource("revanced_hide_audio_track_button_title", "Hide audio track button"),
|
||||
StringResource("revanced_hide_audio_track_button_on", "Audio track button is hidden"),
|
||||
StringResource("revanced_hide_audio_track_button_off", "Audio track button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_latest_posts_ads",
|
||||
StringResource("revanced_hide_latest_posts_ads_title", "Hide latest posts"),
|
||||
StringResource("revanced_hide_latest_posts_ads_summary_on", "Latest posts are hidden"),
|
||||
StringResource("revanced_hide_latest_posts_ads_summary_off", "Latest posts are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_mix_playlists",
|
||||
StringResource("revanced_hide_mix_playlists_title", "Hide mix playlists"),
|
||||
StringResource("revanced_hide_mix_playlists_summary_on", "Mix playlists are hidden"),
|
||||
StringResource("revanced_hide_mix_playlists_summary_off", "Mix playlists are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_artist_cards",
|
||||
StringResource("revanced_hide_artist_cards_title", "Hide artist cards"),
|
||||
StringResource("revanced_hide_artist_cards_on", "Artist cards is hidden"),
|
||||
StringResource("revanced_hide_artist_cards_off", "Artist cards is shown")
|
||||
),
|
||||
)
|
||||
|
||||
PreferenceScreen.ADS.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_general_ads",
|
||||
@@ -232,35 +50,23 @@ class HideAdsResourcePatch : ResourcePatch {
|
||||
StringResource("revanced_hide_self_sponsor_ads_summary_on", "Self sponsored cards are hidden"),
|
||||
StringResource("revanced_hide_self_sponsor_ads_summary_off", "Self sponsored cards are shown")
|
||||
),
|
||||
PreferenceScreen(
|
||||
"revanced_custom_filter_preference_screen",
|
||||
StringResource("revanced_custom_filter_preference_screen_title", "Custom filter"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_custom_filter",
|
||||
StringResource(
|
||||
"revanced_custom_filter_title",
|
||||
"Enable custom filter"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_custom_filter_summary_on",
|
||||
"Custom filter is enabled"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_custom_filter_summary_off",
|
||||
"Custom filter is disabled"
|
||||
)
|
||||
),
|
||||
// TODO: This should be a dynamic ListPreference, which does not exist yet
|
||||
TextPreference(
|
||||
"revanced_custom_filter_strings",
|
||||
StringResource("revanced_custom_filter_strings_title", "Custom filter"),
|
||||
StringResource(
|
||||
"revanced_custom_filter_strings_summary",
|
||||
"Filter components by their name separated by a comma"
|
||||
)
|
||||
)
|
||||
)
|
||||
SwitchPreference(
|
||||
"revanced_hide_products_banner",
|
||||
StringResource("revanced_hide_products_banner_title", "Hide banner to view products"),
|
||||
StringResource("revanced_hide_products_banner_summary_on", "Banner is hidden"),
|
||||
StringResource("revanced_hide_products_banner_summary_off", "Banner is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_web_search_results",
|
||||
StringResource("revanced_hide_web_search_results_title", "Hide web search results"),
|
||||
StringResource("revanced_hide_web_search_results_summary_on", "Web search results are hidden"),
|
||||
StringResource("revanced_hide_web_search_results_summary_off", "Web search results are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_merchandise_banners",
|
||||
StringResource("revanced_hide_merchandise_banners_title", "Hide merchandise banners"),
|
||||
StringResource("revanced_hide_merchandise_banners_summary_on", "Merchandise banners are hidden"),
|
||||
StringResource("revanced_hide_merchandise_banners_summary_off", "Merchandise banners are shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.revanced.patches.youtube.misc.litho.filter.annotation
|
||||
package app.revanced.patches.youtube.layout.hide.general.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class LithoFilterCompatibility
|
||||
internal annotation class HideLayoutComponentsCompatibility
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
package app.revanced.patches.youtube.layout.hide.general.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.shared.settings.preference.impl.TextPreference
|
||||
import app.revanced.patches.youtube.layout.hide.general.annotations.HideLayoutComponentsCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen
|
||||
|
||||
@Patch
|
||||
@Name("hide-layout-components")
|
||||
@Description("Hides general layout components.")
|
||||
@DependsOn([LithoFilterPatch::class, SettingsPatch::class])
|
||||
@HideLayoutComponentsCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideLayoutComponentsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_gray_separator",
|
||||
StringResource("revanced_hide_gray_separator_title", "Hide gray separator"),
|
||||
StringResource("revanced_hide_gray_separator_summary_on", "Gray separators are hidden"),
|
||||
StringResource("revanced_hide_gray_separator_summary_off", "Gray separators are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_guidelines",
|
||||
StringResource("revanced_hide_channel_guidelines_title", "Hide channel guidelines"),
|
||||
StringResource(
|
||||
"revanced_hide_channel_guidelines_summary_on",
|
||||
"Channel guidelines are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_channel_guidelines_summary_off",
|
||||
"Channel guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_chapter_teaser",
|
||||
StringResource(
|
||||
"revanced_hide_chapter_teaser_title",
|
||||
"Hide chapter teaser under videos"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_chapter_teaser_summary_on",
|
||||
"Chapter teasers are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_chapter_teaser_summary_off",
|
||||
"Chapter teasers are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_community_posts",
|
||||
StringResource("revanced_hide_community_posts_title", "Hide community posts"),
|
||||
StringResource("revanced_hide_community_posts_summary_on", "Community posts are hidden"),
|
||||
StringResource("revanced_hide_community_posts_summary_off", "Community posts are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_compact_banner",
|
||||
StringResource("revanced_hide_compact_banner_title", "Hide compact banners"),
|
||||
StringResource("revanced_hide_compact_banner_summary_on", "Compact banners are hidden"),
|
||||
StringResource("revanced_hide_compact_banner_summary_off", "Compact banners are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_movies_section",
|
||||
StringResource("revanced_hide_movies_section_title", "Hide movies section"),
|
||||
StringResource("revanced_hide_movies_section_summary_on", "Movies section is hidden"),
|
||||
StringResource("revanced_hide_movies_section_summary_off", "Movies section is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_feed_survey",
|
||||
StringResource("revanced_hide_feed_survey_title", "Hide feed surveys"),
|
||||
StringResource("revanced_hide_feed_survey_summary_on", "Feed surveys are hidden"),
|
||||
StringResource("revanced_hide_feed_survey_summary_off", "Feed surveys are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_community_guidelines",
|
||||
StringResource("revanced_hide_community_guidelines_title", "Hide community guidelines"),
|
||||
StringResource(
|
||||
"revanced_hide_community_guidelines_summary_on",
|
||||
"Community guidelines are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_community_guidelines_summary_off",
|
||||
"Community guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_subscribers_community_guidelines",
|
||||
StringResource(
|
||||
"revanced_hide_subscribers_community_guidelines_title",
|
||||
"Hide subscribers community guidelines"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_subscribers_community_guidelines_summary_on",
|
||||
"Subscribers community guidelines are hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_subscribers_community_guidelines_summary_off",
|
||||
"Subscribers community guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_member_shelf",
|
||||
StringResource("revanced_hide_channel_member_shelf_title", "Hide channel member shelf"),
|
||||
StringResource(
|
||||
"revanced_hide_channel_member_shelf_summary_on",
|
||||
"Channel member shelf is hidden"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_channel_member_shelf_summary_off",
|
||||
"Channel member shelf is shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_emergency_box",
|
||||
StringResource("revanced_hide_emergency_box_title", "Hide emergency boxes"),
|
||||
StringResource("revanced_hide_emergency_box_summary_on", "Emergency boxes are hidden"),
|
||||
StringResource("revanced_hide_emergency_box_summary_off", "Emergency boxes are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_info_panels",
|
||||
StringResource("revanced_hide_info_panels_title", "Hide info panels"),
|
||||
StringResource("revanced_hide_info_panels_summary_on", "Info panels are hidden"),
|
||||
StringResource("revanced_hide_info_panels_summary_off", "Info panels are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_medical_panels",
|
||||
StringResource("revanced_hide_medical_panels_title", "Hide medical panels"),
|
||||
StringResource("revanced_hide_medical_panels_summary_on", "Medical panels are hidden"),
|
||||
StringResource("revanced_hide_medical_panels_summary_off", "Medical panels are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_bar",
|
||||
StringResource("revanced_hide_channel_bar_title", "Hide channel bar"),
|
||||
StringResource("revanced_hide_channel_bar_summary_on", "Channel bar is hidden"),
|
||||
StringResource("revanced_hide_channel_bar_summary_off", "Channel bar is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_quick_actions",
|
||||
StringResource("revanced_hide_quick_actions_title", "Hide quick actions in fullscreen"),
|
||||
StringResource("revanced_hide_quick_actions_summary_on", "Quick actions are hidden"),
|
||||
StringResource("revanced_hide_quick_actions_summary_off", "Quick actions are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_related_videos",
|
||||
StringResource("revanced_hide_related_videos_title", "Hide related videos in quick actions"),
|
||||
StringResource("revanced_hide_related_videos_summary_on", "Related videos are hidden"),
|
||||
StringResource("revanced_hide_related_videos_summary_off", "Related videos are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_image_shelf",
|
||||
StringResource("revanced_hide_image_shelf", "Hide image shelf in search results"),
|
||||
StringResource("revanced_hide_image_shelf_summary_on", "Image shelf is hidden"),
|
||||
StringResource("revanced_hide_image_shelf_summary_off", "Image shelf is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_audio_track_button",
|
||||
StringResource("revanced_hide_audio_track_button_title", "Hide audio track button"),
|
||||
StringResource("revanced_hide_audio_track_button_on", "Audio track button is hidden"),
|
||||
StringResource("revanced_hide_audio_track_button_off", "Audio track button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_latest_posts_ads",
|
||||
StringResource("revanced_hide_latest_posts_ads_title", "Hide latest posts"),
|
||||
StringResource("revanced_hide_latest_posts_ads_summary_on", "Latest posts are hidden"),
|
||||
StringResource("revanced_hide_latest_posts_ads_summary_off", "Latest posts are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_mix_playlists",
|
||||
StringResource("revanced_hide_mix_playlists_title", "Hide mix playlists"),
|
||||
StringResource("revanced_hide_mix_playlists_summary_on", "Mix playlists are hidden"),
|
||||
StringResource("revanced_hide_mix_playlists_summary_off", "Mix playlists are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_artist_cards",
|
||||
StringResource("revanced_hide_artist_cards_title", "Hide artist cards"),
|
||||
StringResource("revanced_hide_artist_cards_on", "Artist cards is hidden"),
|
||||
StringResource("revanced_hide_artist_cards_off", "Artist cards is shown")
|
||||
),
|
||||
app.revanced.patches.shared.settings.preference.impl.PreferenceScreen(
|
||||
"revanced_custom_filter_preference_screen",
|
||||
StringResource("revanced_custom_filter_preference_screen_title", "Custom filter"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_custom_filter",
|
||||
StringResource(
|
||||
"revanced_custom_filter_title",
|
||||
"Enable custom filter"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_custom_filter_summary_on",
|
||||
"Custom filter is enabled"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_custom_filter_summary_off",
|
||||
"Custom filter is disabled"
|
||||
)
|
||||
),
|
||||
// TODO: This should be a dynamic ListPreference, which does not exist yet
|
||||
TextPreference(
|
||||
"revanced_custom_filter_strings",
|
||||
StringResource("revanced_custom_filter_strings_title", "Custom filter"),
|
||||
StringResource(
|
||||
"revanced_custom_filter_strings_summary",
|
||||
"Filter components by their name separated by a comma"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/components/LayoutComponentsFilter;"
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ import org.jf.dexlib2.iface.reference.StringReference
|
||||
|
||||
@Patch
|
||||
@DependsOn(
|
||||
dependencies = [
|
||||
[
|
||||
IntegrationsPatch::class,
|
||||
VideoIdPatch::class,
|
||||
// Required to skip segments on time.
|
||||
|
||||
@@ -17,7 +17,6 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.annotation.LithoFilterCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.fingerprints.*
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.Instruction
|
||||
@@ -27,7 +26,6 @@ import java.io.Closeable
|
||||
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@Description("Hooks the method which parses the bytes into a ComponentContext to filter components.")
|
||||
@LithoFilterCompatibility
|
||||
@Version("0.0.1")
|
||||
class LithoFilterPatch : BytecodePatch(
|
||||
listOf(ComponentContextParserFingerprint, LithoFilterFingerprint)
|
||||
|
||||
Reference in New Issue
Block a user