Skip to content

Commit 18a790b

Browse files
leumasmeoSumAtrIX
andauthored
feat(Tumblr): Add Disable Ad-Free Banner patch (#3091)
Co-authored-by: oSumAtrIX <[email protected]>
1 parent 616a514 commit 18a790b

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

api/revanced-patches.api

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,12 @@ public final class app/revanced/patches/tumblr/ads/DisableDashboardAds : app/rev
10621062
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
10631063
}
10641064

1065+
public final class app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch : app/revanced/patcher/patch/BytecodePatch {
1066+
public static final field INSTANCE Lapp/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch;
1067+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
1068+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
1069+
}
1070+
10651071
public final class app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch : app/revanced/patcher/patch/BytecodePatch {
10661072
public static final field INSTANCE Lapp/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch;
10671073
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package app.revanced.patches.tumblr.annoyances.adfree
2+
3+
import app.revanced.patcher.data.BytecodeContext
4+
import app.revanced.patcher.patch.BytecodePatch
5+
import app.revanced.patcher.patch.annotation.CompatiblePackage
6+
import app.revanced.patcher.patch.annotation.Patch
7+
import app.revanced.patches.tumblr.featureflags.OverrideFeatureFlagsPatch
8+
9+
@Patch(
10+
name = "Disable Ad-Free Banner",
11+
description = "Disables the banner with a frog, prompting you to buy Tumblr Ad-Free.",
12+
dependencies = [OverrideFeatureFlagsPatch::class],
13+
compatiblePackages = [CompatiblePackage("com.tumblr")],
14+
)
15+
@Suppress("unused")
16+
object DisableAdFreeBannerPatch : BytecodePatch(emptySet()) {
17+
override fun execute(context: BytecodeContext) {
18+
// Disable the "AD_FREE_CTA_BANNER" ("Whether or not to show ad free prompt") feature flag.
19+
OverrideFeatureFlagsPatch.addOverride("adFreeCtaBanner", "false")
20+
}
21+
}

0 commit comments

Comments
 (0)