Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build pull request

on:
workflow_dispatch:
inputs:
pr:
description: "PR to build"
required: true
pull_request:
branches:
- dev
Expand All @@ -10,9 +14,14 @@ jobs:
release:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ inputs.pr && format('refs/pull/{0}/merge', inputs.pr-number) }} || github.ref }}

- name: Setup Java
uses: actions/setup-java@v5
Expand Down
4 changes: 4 additions & 0 deletions patches/api/patches.api
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ public final class app/revanced/patches/fotmob/ads/HideAdsPatchKt {
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 static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;")
}
}
Original file line number Diff line number Diff line change
@@ -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)
}
}