mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-28 13:11:03 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b3e153b60 | ||
|
|
4b6bf69366 | ||
|
|
38e8e7898b | ||
|
|
3175e864af | ||
|
|
d320dd4e58 | ||
|
|
f5ae96defb | ||
|
|
bfe3876cea | ||
|
|
3ad2c42a53 |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,3 +1,30 @@
|
|||||||
|
# [2.113.0](https://github.com/revanced/revanced-patches/compare/v2.112.0...v2.113.0) (2022-11-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/general-ads:** hide ads with buttons ([97fd3fd](https://github.com/revanced/revanced-patches/commit/97fd3fda79ff4bb2fadd0e6c4aa80b96d71f46da))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/general-ads:** custom component filter ([b5e81d0](https://github.com/revanced/revanced-patches/commit/b5e81d0eaff3ab67a59ccd45eac6bf9414ed1380))
|
||||||
|
* **youtube/general-ads:** hide gray separators ([59693f0](https://github.com/revanced/revanced-patches/commit/59693f007192c195258cea3a222d7fb94b6385c2))
|
||||||
|
|
||||||
|
# [2.112.0](https://github.com/revanced/revanced-patches/compare/v2.111.3...v2.112.0) (2022-11-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **anytracker:** `unlock-premium` patch ([#1076](https://github.com/revanced/revanced-patches/issues/1076)) ([52b3d90](https://github.com/revanced/revanced-patches/commit/52b3d909bbe59dafaea0cb9da1c27bdd0cda502f))
|
||||||
|
|
||||||
|
## [2.111.3](https://github.com/revanced/revanced-patches/compare/v2.111.2...v2.111.3) (2022-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/litho-filter:** use correct type for switch case ([#1068](https://github.com/revanced/revanced-patches/issues/1068)) ([ab03511](https://github.com/revanced/revanced-patches/commit/ab03511e23d07c7c40b58eae5791fb2a798289de))
|
||||||
|
|
||||||
## [2.111.2](https://github.com/revanced/revanced-patches/compare/v2.111.1...v2.111.2) (2022-11-18)
|
## [2.111.2](https://github.com/revanced/revanced-patches/compare/v2.111.1...v2.111.2) (2022-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -144,6 +144,14 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `unlock-themes` | Unlocks all themes. | all |
|
| `unlock-themes` | Unlocks all themes. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.shervinkoushan.anyTracker`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-premium` | Unlocks all premium features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
### 📦 `tv.twitch.android.app`
|
### 📦 `tv.twitch.android.app`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.111.2
|
version = 2.113.0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -13,8 +13,8 @@ import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibilit
|
|||||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.*
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn(dependencies = [FixLocaleConfigErrorPatch::class, LithoFilterPatch::class, SettingsPatch::class])
|
@DependsOn(dependencies = [FixLocaleConfigErrorPatch::class, LithoFilterPatch::class, SettingsPatch::class])
|
||||||
@@ -24,7 +24,7 @@ import app.revanced.patches.youtube.misc.settings.framework.components.impl.Swit
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class GeneralAdsPatch : ResourcePatch {
|
class GeneralAdsPatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
SettingsPatch.PreferenceScreen.ADS.addPreferences(
|
PreferenceScreen.ADS.addPreferences(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_home_ads_removal",
|
"revanced_home_ads_removal",
|
||||||
StringResource("revanced_home_ads_removal_title", "Remove home ads"),
|
StringResource("revanced_home_ads_removal_title", "Remove home ads"),
|
||||||
@@ -39,6 +39,13 @@ class GeneralAdsPatch : ResourcePatch {
|
|||||||
StringResource("revanced_adremover_ad_removal_enabled_summary_on", "General ads are hidden"),
|
StringResource("revanced_adremover_ad_removal_enabled_summary_on", "General ads are hidden"),
|
||||||
StringResource("revanced_adremover_ad_removal_enabled_summary_off", "General ads are shown")
|
StringResource("revanced_adremover_ad_removal_enabled_summary_off", "General ads are shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_buttoned",
|
||||||
|
StringResource("revanced_adremover_buttoned_enabled_title", "Remove buttoned ad"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_buttoned_enabled_summary_on", "Buttoned ads are hidden"),
|
||||||
|
StringResource("revanced_adremover_buttoned_enabled_summary_off", "Buttoned ads are shown")
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_adremover_merchandise",
|
"revanced_adremover_merchandise",
|
||||||
StringResource("revanced_adremover_merchandise_enabled_title", "Remove merchandise banners"),
|
StringResource("revanced_adremover_merchandise_enabled_title", "Remove merchandise banners"),
|
||||||
@@ -156,6 +163,13 @@ class GeneralAdsPatch : ResourcePatch {
|
|||||||
StringResource("revanced_adremover_self_sponsor_enabled_summary_on", "Self sponsored cards are hidden"),
|
StringResource("revanced_adremover_self_sponsor_enabled_summary_on", "Self sponsored cards are hidden"),
|
||||||
StringResource("revanced_adremover_self_sponsor_enabled_summary_off", "Self sponsored cards are shown")
|
StringResource("revanced_adremover_self_sponsor_enabled_summary_off", "Self sponsored cards are shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_separator",
|
||||||
|
StringResource("revanced_adremover_separator_title", "Hide gray separator"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_separator_summary_on", "Gray separators are hidden"),
|
||||||
|
StringResource("revanced_adremover_separator_summary_off", "Gray separators are shown")
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_adremover_chapter_teaser",
|
"revanced_adremover_chapter_teaser",
|
||||||
StringResource(
|
StringResource(
|
||||||
@@ -171,6 +185,39 @@ class GeneralAdsPatch : ResourcePatch {
|
|||||||
"revanced_adremover_chapter_teaser_enabled_summary_off",
|
"revanced_adremover_chapter_teaser_enabled_summary_off",
|
||||||
"Chapter teasers are shown"
|
"Chapter teasers are shown"
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
PreferenceScreen(
|
||||||
|
"revanced_adremover_custom",
|
||||||
|
StringResource("revanced_adremover_custom_title", "Custom filter"),
|
||||||
|
listOf(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_custom_enabled",
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_enabled_title",
|
||||||
|
"Enable custom filter"
|
||||||
|
),
|
||||||
|
false,
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_enabled_summary_on",
|
||||||
|
"Custom filter is enabled"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_enabled_summary_off",
|
||||||
|
"Custom filter is disabled"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// TODO: This should be a ListPreference, which does not exist yet
|
||||||
|
TextPreference(
|
||||||
|
"revanced_adremover_custom_strings",
|
||||||
|
StringResource("revanced_adremover_custom_strings_title", "Custom filter"),
|
||||||
|
InputType.STRING,
|
||||||
|
"",
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_strings_summary",
|
||||||
|
"Filter components by their name separated by a comma"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -47,15 +47,15 @@ class LithoFilterPatch : BytecodePatch(
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
insertHookIndex, // right after setting the component.pathBuilder field,
|
insertHookIndex, // right after setting the component.pathBuilder field,
|
||||||
"""
|
"""
|
||||||
invoke-static {v5, v2}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
|
invoke-static {v5, v2}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
|
||||||
move-result v$clobberedRegister
|
move-result v$clobberedRegister
|
||||||
if-eqz v$clobberedRegister, :not_an_ad
|
if-eqz v$clobberedRegister, :not_an_ad
|
||||||
move-object/from16 v2, p1
|
move-object/from16 v2, p1
|
||||||
invoke-static {v2}, $builderMethodDescriptor
|
invoke-static {v2}, $builderMethodDescriptor
|
||||||
move-result-object v0
|
move-result-object v0
|
||||||
iget-object v0, v0, $emptyComponentFieldDescriptor
|
iget-object v0, v0, $emptyComponentFieldDescriptor
|
||||||
return-object v0
|
return-object v0
|
||||||
""",
|
""",
|
||||||
listOf(ExternalLabel("not_an_ad", instruction(insertHookIndex)))
|
listOf(ExternalLabel("not_an_ad", instruction(insertHookIndex)))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -65,21 +65,13 @@ class LithoFilterPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
fun Instruction.toDescriptor() = when (val reference = (this as ReferenceInstruction).reference) {
|
fun Instruction.toDescriptor() = when (val reference = (this as? ReferenceInstruction)?.reference) {
|
||||||
MethodReference::class -> {
|
is MethodReference -> "${reference.definingClass}->${reference.name}(${
|
||||||
val methodReference = reference as MethodReference
|
reference.parameterTypes.joinToString(
|
||||||
"${methodReference.definingClass}->${methodReference.name}(${
|
""
|
||||||
methodReference.parameterTypes.joinToString(
|
) { it }
|
||||||
""
|
})${reference.returnType}"
|
||||||
) { it }
|
is FieldReference -> "${reference.definingClass}->${reference.name}:${reference.type}"
|
||||||
})${methodReference.returnType}"
|
|
||||||
}
|
|
||||||
|
|
||||||
FieldReference::class -> {
|
|
||||||
val fieldReference = reference as FieldReference
|
|
||||||
"${fieldReference.definingClass}->${fieldReference.name}:${fieldReference.type}"
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> throw PatchResultError("Unsupported reference type")
|
else -> throw PatchResultError("Unsupported reference type")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user