feat(gmxmail): add hide sponsored ads and remove premium upgrade button patch
This commit is contained in:
parent
de8c004dc2
commit
818cf509f2
3 changed files with 36 additions and 0 deletions
|
|
@ -236,6 +236,10 @@ public final class app/revanced/patches/fotmob/ads/HideAdsPatchKt {
|
||||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/gmxmail/ads/HideAdsPatchKt {
|
||||||
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatchKt {
|
public final class app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatchKt {
|
||||||
public static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
15
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt
Executable file
15
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
package app.revanced.patches.gmxmail.ads
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
|
internal val getAdvertisementStatusFingerprint = fingerprint {
|
||||||
|
custom { method, classDef ->
|
||||||
|
method.name == "getAdvertisementStatus" && classDef.endsWith("/PayMailManager;")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val isUpsellingPossibleFingerprint = fingerprint {
|
||||||
|
custom { method, classDef ->
|
||||||
|
method.name == "isUpsellingPossible" && classDef.endsWith("/PayMailManager;")
|
||||||
|
}
|
||||||
|
}
|
||||||
17
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt
Executable file
17
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
package app.revanced.patches.gmxmail.ads
|
||||||
|
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.util.returnEarly
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val hideAdsPatch = bytecodePatch(
|
||||||
|
name = "Hide ads",
|
||||||
|
description = "Hides sponsored ads and removes the Premium upgrade button from the navigation drawer.",
|
||||||
|
) {
|
||||||
|
compatibleWith("de.gmx.mobile.android.mail")
|
||||||
|
|
||||||
|
execute {
|
||||||
|
getAdvertisementStatusFingerprint.method.returnEarly(2)
|
||||||
|
isUpsellingPossibleFingerprint.method.returnEarly(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue