From 32ed7f245db1d7938f467d323f69ca0d6f4253b5 Mon Sep 17 00:00:00 2001 From: inotia00 Date: Wed, 28 Jun 2023 21:48:19 +0900 Subject: [PATCH] refactor(youtube): renamed some patches description --- .../patch/ShareButtonHookPatch.kt | 2 +- .../bytecode/patch/GeneralAdsBytecodePatch.kt | 3 - .../patch/OldQualityLayoutPatch.kt | 1 + .../patch/PlayerFlyoutPanelPatch.kt} | 15 ++- .../layout/patch/LayoutComponentsPatch.kt | 11 +- .../patch/TabletMiniPlayerPatch.kt | 4 +- .../widesearchbar/patch/WideSearchbarPatch.kt | 101 --------------- ...t.kt => ShortsPaidPromotionFingerprint.kt} | 2 +- .../patch/ShortsComponentPatch.kt | 2 +- ...h.kt => ShortsPaidPromotionBannerPatch.kt} | 14 +- .../WatchWhileActivityFingerprint.kt | 2 +- .../utils/litho/patch/LithoFilterPatch.kt | 2 +- .../youtube/settings/host/values/strings.xml | 121 +++++++++--------- .../youtube/settings/values-v21/strings.xml | 6 +- .../youtube/settings/xml/revanced_prefs.xml | 57 +++++---- 15 files changed, 125 insertions(+), 218 deletions(-) rename src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/{general/patch/FlyoutPanelPatch.kt => player/patch/PlayerFlyoutPanelPatch.kt} (71%) delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/general/widesearchbar/patch/WideSearchbarPatch.kt rename src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/{ShortsPaidContentFingerprint.kt => ShortsPaidPromotionFingerprint.kt} (87%) rename src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/{ShortsPaidContentBannerPatch.kt => ShortsPaidPromotionBannerPatch.kt} (85%) diff --git a/src/main/kotlin/app/revanced/patches/music/misc/sharebuttonhook/patch/ShareButtonHookPatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/sharebuttonhook/patch/ShareButtonHookPatch.kt index c55f1668d..2088ead4b 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/sharebuttonhook/patch/ShareButtonHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/sharebuttonhook/patch/ShareButtonHookPatch.kt @@ -28,7 +28,7 @@ import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH @Patch @Name("share-button-hook") -@Description("Replace share button with external download button or sleep timer dialog.") +@Description("Replace share button with external download button.") @DependsOn( [ SettingsPatch::class, diff --git a/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt index b169a1fcb..f2bef1be5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt @@ -12,7 +12,6 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.AdAttribution -import app.revanced.util.bytecode.BytecodeHelper.updatePatchStatus import app.revanced.util.bytecode.getWideLiteralIndex import app.revanced.util.bytecode.isWideLiteralExists import org.jf.dexlib2.iface.instruction.formats.Instruction35c @@ -48,8 +47,6 @@ class GeneralAdsBytecodePatch : BytecodePatch() { } } - context.updatePatchStatus("GeneralAds") - return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt index 63ccc28e9..692097c6f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt @@ -53,6 +53,7 @@ class OldQualityLayoutPatch : BytecodePatch( SettingsPatch.addPreference( arrayOf( "PREFERENCE: FLYOUT_PANEL_SETTINGS", + "SETTINGS: PLAYER_FLYOUT_PANEL_HEADER", "SETTINGS: ENABLE_OLD_QUALITY_LAYOUT" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/general/patch/FlyoutPanelPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/player/patch/PlayerFlyoutPanelPatch.kt similarity index 71% rename from src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/general/patch/FlyoutPanelPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/player/patch/PlayerFlyoutPanelPatch.kt index 20b3d03fe..5d473fc63 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/general/patch/FlyoutPanelPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/flyoutpanel/player/patch/PlayerFlyoutPanelPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.flyoutpanel.general.patch +package app.revanced.patches.youtube.flyoutpanel.player.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -15,8 +15,8 @@ import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.PATCHES_PATH @Patch -@Name("hide-flyout-panel") -@Description("Adds options to hide player settings flyout panel.") +@Name("hide-player-flyout-panel") +@Description("Hides player flyout panel components.") @DependsOn( [ LithoFilterPatch::class, @@ -25,9 +25,9 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH ) @YouTubeCompatibility @Version("0.0.1") -class FlyoutPanelPatch : ResourcePatch { +class PlayerFlyoutPanelPatch : ResourcePatch { override fun execute(context: ResourceContext): PatchResult { - LithoFilterPatch.addFilter("$PATCHES_PATH/ads/FlyoutPanelsFilter;") + LithoFilterPatch.addFilter("$PATCHES_PATH/ads/PlayerFlyoutPanelsFilter;") /** * Add settings @@ -35,11 +35,12 @@ class FlyoutPanelPatch : ResourcePatch { SettingsPatch.addPreference( arrayOf( "PREFERENCE: FLYOUT_PANEL_SETTINGS", - "SETTINGS: FLYOUT_PANEL_COMPONENT" + "SETTINGS: PLAYER_FLYOUT_PANEL_HEADER", + "SETTINGS: HIDE_PLAYER_FLYOUT_PANEL" ) ) - SettingsPatch.updatePatchStatus("hide-flyout-panel") + SettingsPatch.updatePatchStatus("hide-player-flyout-panel") return PatchResultSuccess() } diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/layout/patch/LayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/layout/patch/LayoutComponentsPatch.kt index 5e679225f..77723839b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/layout/patch/LayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/layout/patch/LayoutComponentsPatch.kt @@ -3,15 +3,16 @@ package app.revanced.patches.youtube.general.layout.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version -import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess -import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility import app.revanced.patches.youtube.utils.litho.patch.LithoFilterPatch import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch +import app.revanced.util.bytecode.BytecodeHelper.updatePatchStatus import app.revanced.util.integrations.Constants.PATCHES_PATH @Patch @@ -25,8 +26,8 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH ) @YouTubeCompatibility @Version("0.0.1") -class LayoutComponentsPatch : ResourcePatch { - override fun execute(context: ResourceContext): PatchResult { +class LayoutComponentsPatch : BytecodePatch() { + override fun execute(context: BytecodeContext): PatchResult { LithoFilterPatch.addFilter("$PATCHES_PATH/ads/CommunityPostFilter;") LithoFilterPatch.addFilter("$PATCHES_PATH/ads/LayoutComponentsFilter;") @@ -45,6 +46,8 @@ class LayoutComponentsPatch : ResourcePatch { SettingsPatch.updatePatchStatus("hide-layout-components") + context.updatePatchStatus("LayoutComponent") + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt index 1765531ba..f4847bf0f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt @@ -29,7 +29,7 @@ import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch -@Name("enable-tablet-miniplayer") +@Name("enable-tablet-mini-player") @Description("Enables the tablet mini player layout.") @DependsOn( [ @@ -85,7 +85,7 @@ class TabletMiniPlayerPatch : BytecodePatch( ) ) - SettingsPatch.updatePatchStatus("enable-tablet-miniplayer") + SettingsPatch.updatePatchStatus("enable-tablet-mini-player") return PatchResultSuccess() } diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/widesearchbar/patch/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/widesearchbar/patch/WideSearchbarPatch.kt deleted file mode 100644 index 5e8718f24..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/general/widesearchbar/patch/WideSearchbarPatch.kt +++ /dev/null @@ -1,101 +0,0 @@ -package app.revanced.patches.youtube.general.widesearchbar.patch - -import app.revanced.extensions.toErrorResult -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Version -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.data.toMethodWalker -import app.revanced.patcher.extensions.InstructionExtensions.addInstructions -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchResult -import app.revanced.patcher.patch.PatchResultSuccess -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.youtube.general.widesearchbar.fingerprints.SetActionBarRingoFingerprint -import app.revanced.patches.youtube.utils.fingerprints.SetToolBarPaddingFingerprint -import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility -import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch -import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch -import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch.Companion.contexts -import app.revanced.util.integrations.Constants.GENERAL - -@Patch -@Name("enable-wide-searchbar") -@Description("Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.") -@DependsOn( - [ - SettingsPatch::class, - SharedResourceIdPatch::class - ] -) -@YouTubeCompatibility -@Version("0.0.1") -class WideSearchbarPatch : BytecodePatch( - listOf( - SetActionBarRingoFingerprint, - SetToolBarPaddingFingerprint - ) -) { - override fun execute(context: BytecodeContext): PatchResult { - - arrayOf( - SetActionBarRingoFingerprint, - SetToolBarPaddingFingerprint - ).forEach { - it.injectHook(context) - } - - /** - * Set Wide SearchBar Start Margin - */ - contexts.xmlEditor[TARGET_RESOURCE_PATH].use { editor -> - val document = editor.file - - with(document.getElementsByTagName("RelativeLayout").item(0)) { - if (attributes.getNamedItem(FLAG) != null) return@with - - document.createAttribute(FLAG) - .apply { value = "8.0dip" } - .let(attributes::setNamedItem) - } - } - - /** - * Add settings - */ - SettingsPatch.addPreference( - arrayOf( - "PREFERENCE: GENERAL_SETTINGS", - "SETTINGS: ENABLE_WIDE_SEARCHBAR" - ) - ) - - SettingsPatch.updatePatchStatus("enable-wide-searchbar") - - return PatchResultSuccess() - } - - private companion object { - const val FLAG = "android:paddingStart" - const val TARGET_RESOURCE_PATH = "res/layout/action_bar_ringo_background.xml" - - fun MethodFingerprint.injectHook(context: BytecodeContext) { - result?.let { - (context - .toMethodWalker(it.method) - .nextMethod(it.scanResult.patternScanResult!!.endIndex, true) - .getMethod() as MutableMethod).apply { - addInstructions( - implementation!!.instructions.size - 1, """ - invoke-static {}, $GENERAL->enableWideSearchbar()Z - move-result p0 - """ - ) - } - } ?: throw toErrorResult() - } - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/ShortsPaidContentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/ShortsPaidPromotionFingerprint.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/ShortsPaidContentFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/ShortsPaidPromotionFingerprint.kt index f257fd1dd..a31571e45 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/ShortsPaidContentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/fingerprints/ShortsPaidPromotionFingerprint.kt @@ -4,6 +4,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.ReelPlayerBadge import app.revanced.util.bytecode.isWideLiteralExists -object ShortsPaidContentFingerprint : MethodFingerprint( +object ShortsPaidPromotionFingerprint : MethodFingerprint( customFingerprint = { methodDef, _ -> methodDef.isWideLiteralExists(ReelPlayerBadge) } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt index 55edc060a..7d5d9c2df 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt @@ -32,7 +32,7 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH ShortsInfoPanelPatch::class, ShortsLikeButtonPatch::class, ShortsNavigationBarPatch::class, - ShortsPaidContentBannerPatch::class, + ShortsPaidPromotionBannerPatch::class, ShortsRemixButtonPatch::class, ShortsShareButtonPatch::class, ShortsSubscriptionsButtonPatch::class, diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsPaidContentBannerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsPaidPromotionBannerPatch.kt similarity index 85% rename from src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsPaidContentBannerPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsPaidPromotionBannerPatch.kt index 2d5600a48..80327fdc9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsPaidContentBannerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsPaidPromotionBannerPatch.kt @@ -10,7 +10,7 @@ import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.youtube.shorts.shortscomponent.fingerprints.ShortsPaidContentFingerprint +import app.revanced.patches.youtube.shorts.shortscomponent.fingerprints.ShortsPaidPromotionFingerprint import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.ReelPlayerBadge import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.ReelPlayerBadge2 @@ -18,14 +18,14 @@ import app.revanced.util.bytecode.getWideLiteralIndex import app.revanced.util.integrations.Constants.SHORTS import org.jf.dexlib2.iface.instruction.OneRegisterInstruction -@Name("hide-shorts-paid-content") +@Name("hide-shorts-paid-promotion") @YouTubeCompatibility @Version("0.0.1") -class ShortsPaidContentBannerPatch : BytecodePatch( - listOf(ShortsPaidContentFingerprint) +class ShortsPaidPromotionBannerPatch : BytecodePatch( + listOf(ShortsPaidPromotionFingerprint) ) { override fun execute(context: BytecodeContext): PatchResult { - ShortsPaidContentFingerprint.result?.let { + ShortsPaidPromotionFingerprint.result?.let { it.mutableMethod.apply { val primaryIndex = getWideLiteralIndex(ReelPlayerBadge) + 3 val secondaryIndex = getWideLiteralIndex(ReelPlayerBadge2) + 3 @@ -38,7 +38,7 @@ class ShortsPaidContentBannerPatch : BytecodePatch( insertHook(primaryIndex) } } - } ?: return ShortsPaidContentFingerprint.toErrorResult() + } ?: return ShortsPaidPromotionFingerprint.toErrorResult() return PatchResultSuccess() } @@ -49,7 +49,7 @@ class ShortsPaidContentBannerPatch : BytecodePatch( addInstructions( insertIndex + 1, """ - invoke-static {v$insertRegister}, $SHORTS->hideShortsPlayerPaidContent(Landroid/view/ViewStub;)Landroid/view/ViewStub; + invoke-static {v$insertRegister}, $SHORTS->hideShortsPlayerPaidPromotionBanner(Landroid/view/ViewStub;)Landroid/view/ViewStub; move-result-object v$insertRegister """ ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/swipe/swipecontrols/bytecode/fingerprints/WatchWhileActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/swipe/swipecontrols/bytecode/fingerprints/WatchWhileActivityFingerprint.kt index ff6c5a14f..ba0d11559 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/swipe/swipecontrols/bytecode/fingerprints/WatchWhileActivityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/swipe/swipecontrols/bytecode/fingerprints/WatchWhileActivityFingerprint.kt @@ -7,5 +7,5 @@ import org.jf.dexlib2.AccessFlags object WatchWhileActivityFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, parameters = emptyList(), - customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "" } + customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("WatchWhileActivity;") } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/litho/patch/LithoFilterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/litho/patch/LithoFilterPatch.kt index f9b387fa8..b00cb4a27 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/litho/patch/LithoFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/litho/patch/LithoFilterPatch.kt @@ -39,7 +39,7 @@ class LithoFilterPatch : BytecodePatch( ByteBufferFingerprint.result?.mutableMethod?.addInstruction( 0, - "sput-object p0, $ADS_PATH/ByteBufferFilterPatch;->bytebuffer:Ljava/nio/ByteBuffer;" + "sput-object p0, $ADS_PATH/LowLevelFilter;->byteBuffer:Ljava/nio/ByteBuffer;" ) ?: return ByteBufferFingerprint.toErrorResult() generalHook("$ADS_PATH/LithoFilterPatch;->filters") diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index 4291aa6ba..0c8e4d908 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -137,9 +137,9 @@ Enable time stamp speed Spoof device information to enable vp9 codec Enable vp9 codec - Wide search bar is disabled - Wide search bar is enabled - Enable wide search bar + Wide search bar is disabled + Wide search bar is enabled + Enable wide search bar Experimental Flags Save your ReVanced settings to file Export settings @@ -294,6 +294,9 @@ Gray description is shown Gray description is hidden Hide gray description + Gray separators are shown + Gray separators are hidden + Hide gray separator Home button is shown Home button is hidden Hide home button @@ -321,45 +324,9 @@ Medical panels are shown Medical panels are hidden Hide medical panels - Ambient mode menu is shown - Ambient mode menu is hidden - Hide ambient mode menu - Audio track menu is shown - Audio track menu is hidden - Hide audio track menu - Captions menu is shown - Captions menu is hidden - Hide captions menu - Help & feedback menu is shown - Help & feedback menu is hidden - Hide help & feedback menu - Listening controls menu is shown - Listening controls menu is hidden - Hide listening controls menu - Listen with YouTube Music menu is shown - Listen with YouTube Music menu is hidden - Hide listen with YouTube Music menu - Loop video menu is shown - Loop video menu is hidden - Hide loop video menu - More information menu is shown - More information menu is hidden - Hide more information menu - Report menu is shown - Report menu is hidden - Hide report menu - Playback speed menu is shown - Playback speed menu is hidden - Hide playback speed menu - Stats for nerds menu is shown - Stats for nerds menu is hidden - Hide stats for nerds menu - Watch in VR menu is shown - Watch in VR menu is hidden - Hide watch in VR menu - Merchandise banners are shown - Merchandise banners are hidden - Hide merchandise banners + Merchandise shelves are shown + Merchandise shelves are hidden + Hide merchandise shelf Mix playlist is shown Mix playlist is hidden Hide mix playlist @@ -372,12 +339,48 @@ Official header is shown Official header is hidden Hide official header - Paid promotion label is shown - Paid promotion label is hidden - Hide paid promotion + Paid promotion banner is shown + Paid promotion banner is hidden + Hide paid promotion banner Player button background is shown Player button background is hidden Hide player button background + Ambient mode menu is shown + Ambient mode menu is hidden + Hide ambient mode menu + Audio track menu is shown + Audio track menu is hidden + Hide audio track menu + Captions menu is shown + Captions menu is hidden + Hide captions menu + Help & feedback menu is shown + Help & feedback menu is hidden + Hide help & feedback menu + Listening controls menu is shown + Listening controls menu is hidden + Hide listening controls menu + Listen with YouTube Music menu is shown + Listen with YouTube Music menu is hidden + Hide listen with YouTube Music menu + Loop video menu is shown + Loop video menu is hidden + Hide loop video menu + More information menu is shown + More information menu is hidden + Hide more information menu + Report menu is shown + Report menu is hidden + Hide report menu + Playback speed menu is shown + Playback speed menu is hidden + Hide playback speed menu + Stats for nerds menu is shown + Stats for nerds menu is hidden + Hide stats for nerds menu + Watch in VR menu is shown + Watch in VR menu is hidden + Hide watch in VR menu Player overlay filter is shown Player overlay filter is hidden Hide player overlay filter @@ -411,12 +414,9 @@ Seek message is shown Seek message is hidden Hide seek message - Self sponsored cards are shown - Self sponsored cards are hidden - Hide self sponsored cards - Gray separators are shown - Gray separators are hidden - Hide gray separator + Self sponsored cards are shown + Self sponsored cards are hidden + Hide self sponsored cards Shorts button is shown Shorts button is hidden Hide shorts button @@ -449,8 +449,14 @@ Suggested actions shown Suggested actions hidden Hide suggested actions - Following shelves are shown: Breaking news, Explore more channels, Shopping - Following shelves are hidden: Breaking news, Explore more channels, Shopping + "Following shelves are shown +- Breaking news +- Explore more channels +- Shopping" + "Following shelves are hidden +- Breaking news +- Explore more channels +- Shopping" Hide suggestions shelf Ticket shelves are shown Ticket shelves are hidden @@ -467,9 +473,9 @@ View products banner is shown View products banner is hidden Hide view products banner - Web search panels are shown - Web search panels are hidden - Hide web search panels + Web search results are shown + Web search results are hidden + Hide web search results YouTube Music button is shown YouTube Music button is hidden Hide youtube music button @@ -483,7 +489,6 @@ Open library on app startup Others Overlay button - Tap and hold to toggle pause after repeat states "Tap to toggle always repeat states Tap and hold to toggle pause after repeat states" Show always repeat button @@ -498,7 +503,7 @@ Tap and hold to copy video timestamp" Video speed reseted (1.0x) "Tap to open speed dialog Tap and hold to set video speed to 1.0x" - Show speed button + Show speed dialog button Current Header: Default Header Current Header: Premium Header Premium Header diff --git a/src/main/resources/youtube/settings/values-v21/strings.xml b/src/main/resources/youtube/settings/values-v21/strings.xml index 52a87bb66..978b46476 100644 --- a/src/main/resources/youtube/settings/values-v21/strings.xml +++ b/src/main/resources/youtube/settings/values-v21/strings.xml @@ -48,9 +48,9 @@ @string/revanced_hide_button_like_summary_off @string/revanced_hide_button_like_summary_on @string/revanced_hide_button_like_title - @string/revanced_hide_paid_content_summary_off - @string/revanced_hide_paid_content_summary_on - @string/revanced_hide_paid_content_title + @string/revanced_hide_paid_promotion_banner_summary_off + @string/revanced_hide_paid_promotion_banner_summary_on + @string/revanced_hide_paid_promotion_banner_title @string/revanced_hide_button_remix_summary_off @string/revanced_hide_button_remix_summary_on @string/revanced_hide_button_remix_title diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 9b52a601a..e2c390ae2 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -9,11 +9,11 @@ + SETTINGS: HIDE_GENERAL_ADS --> @@ -58,26 +58,27 @@ + PREFERENCE: FLYOUT_PANEL_SETTINGS --> + + - + @@ -130,8 +131,8 @@ - +