mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(YouTube Music - Hide ads): Changed the default value of Hide fullscreen ads
setting to off and added a warning to the setting
This commit is contained in:
@ -151,7 +151,7 @@ val adsPatch = bytecodePatch(
|
||||
addSwitchPreference(
|
||||
CategoryType.ADS,
|
||||
"revanced_hide_fullscreen_ads",
|
||||
"true"
|
||||
"false"
|
||||
)
|
||||
addSwitchPreference(
|
||||
CategoryType.ADS,
|
||||
|
@ -2,11 +2,13 @@ package app.revanced.patches.youtube.ads.general
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.ads.baseAdsPatch
|
||||
import app.revanced.patches.shared.ads.hookLithoFullscreenAds
|
||||
import app.revanced.patches.shared.ads.hookNonLithoFullscreenAds
|
||||
import app.revanced.patches.shared.extension.Constants.PATCHES_PATH
|
||||
import app.revanced.patches.shared.litho.addLithoFilter
|
||||
import app.revanced.patches.shared.litho.lithoFilterPatch
|
||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||
@ -20,6 +22,7 @@ import app.revanced.patches.youtube.utils.resourceid.interstitialsContainer
|
||||
import app.revanced.patches.youtube.utils.resourceid.sharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
|
||||
import app.revanced.patches.youtube.utils.settings.settingsPatch
|
||||
import app.revanced.util.findMethodOrThrow
|
||||
import app.revanced.util.findMutableMethodOf
|
||||
import app.revanced.util.fingerprint.matchOrThrow
|
||||
import app.revanced.util.fingerprint.methodOrThrow
|
||||
@ -129,6 +132,13 @@ val adsPatch = bytecodePatch(
|
||||
|
||||
// endregion
|
||||
|
||||
findMethodOrThrow("$PATCHES_PATH/PatchStatus;") {
|
||||
name == "HideFullscreenAdsDefaultBoolean"
|
||||
}.replaceInstruction(
|
||||
0,
|
||||
"const/4 v0, 0x1"
|
||||
)
|
||||
|
||||
// region add settings
|
||||
|
||||
addPreference(
|
||||
|
Reference in New Issue
Block a user