mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-13 04:08:01 +01:00
refactor: hide-autoplay-button
& refactor: hide-autoplay-button
&& premium-heading
patch
This commit is contained in:
parent
ab9213641c
commit
c1a0f2c035
@ -12,7 +12,7 @@ import org.jf.dexlib2.Opcode
|
|||||||
|
|
||||||
@Name("autonav-informer-fingerprint")
|
@Name("autonav-informer-fingerprint")
|
||||||
@MatchingMethod(
|
@MatchingMethod(
|
||||||
"com/google/android/libraries/youtube/player/features/prefetch/WillAutonavInformer;", "k"
|
"LWillAutonavInformer;", "k"
|
||||||
)
|
)
|
||||||
@FuzzyPatternScanMethod(2)
|
@FuzzyPatternScanMethod(2)
|
||||||
@AutoplayButtonCompatibility
|
@AutoplayButtonCompatibility
|
||||||
|
@ -12,7 +12,7 @@ import org.jf.dexlib2.Opcode
|
|||||||
|
|
||||||
@Name("layout-constructor-fingerprint")
|
@Name("layout-constructor-fingerprint")
|
||||||
@MatchingMethod(
|
@MatchingMethod(
|
||||||
"Lcom/google/android/apps/youtube/app/player/overlay/YouTubeControlsOverlay;", "F"
|
"LYouTubeControlsOverlay;", "F"
|
||||||
)
|
)
|
||||||
@FuzzyPatternScanMethod(2)
|
@FuzzyPatternScanMethod(2)
|
||||||
@AutoplayButtonCompatibility
|
@AutoplayButtonCompatibility
|
||||||
|
@ -19,11 +19,11 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Dependencies(dependencies = [ResourceIdMappingProviderResourcePatch::class])
|
@Dependencies(dependencies = [ResourceIdMappingProviderResourcePatch::class])
|
||||||
@Name("disable-autoplay-button")
|
@Name("hide-autoplay-button")
|
||||||
@Description("Disable the autoplay button.")
|
@Description("Disable the autoplay button.")
|
||||||
@AutoplayButtonCompatibility
|
@AutoplayButtonCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class AutoplayButtonRemoverPatch : BytecodePatch(
|
class HideAutoplayButton : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
LayoutConstructorFingerprint, AutonavInformerFingerprint
|
LayoutConstructorFingerprint, AutonavInformerFingerprint
|
||||||
)
|
)
|
@ -26,7 +26,7 @@ import kotlin.io.path.exists
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class PremiumHeadingPatch : ResourcePatch() {
|
class PremiumHeadingPatch : ResourcePatch() {
|
||||||
override fun execute(data: ResourceData): PatchResult {
|
override fun execute(data: ResourceData): PatchResult {
|
||||||
val resDirectory = data.get("res")
|
val resDirectory = data["res"]
|
||||||
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
|
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
|
||||||
|
|
||||||
val (original, replacement) = "yt_premium_wordmark_header" to "yt_wordmark_header"
|
val (original, replacement) = "yt_premium_wordmark_header" to "yt_wordmark_header"
|
||||||
|
Loading…
Reference in New Issue
Block a user