mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 09:07:46 +01:00
fix(youtube/general-ads): hide ads with buttons
This commit is contained in:
parent
91c4b8f1cd
commit
07c78a9128
1 changed files with 10 additions and 3 deletions
|
@ -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.manifest.patch.FixLocaleConfigErrorPatch
|
||||
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.framework.components.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen
|
||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.*
|
||||
|
||||
@Patch
|
||||
@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")
|
||||
class GeneralAdsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.ADS.addPreferences(
|
||||
PreferenceScreen.ADS.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_home_ads_removal",
|
||||
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_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(
|
||||
"revanced_adremover_merchandise",
|
||||
StringResource("revanced_adremover_merchandise_enabled_title", "Remove merchandise banners"),
|
||||
|
|
Loading…
Reference in a new issue