From a57c0f9d9b088448e4c5854f9458dcb048fca10b Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:36:04 +0900 Subject: [PATCH] feat(YouTube/Hide layout components): custom filtering of the protocol buffer --- .../patches/youtube/general/layout/LayoutComponentsPatch.kt | 1 + src/main/resources/youtube/settings/host/values/strings.xml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt index d6782cf30..a4e840382 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt @@ -51,6 +51,7 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch object LayoutComponentsPatch : BytecodePatch(emptySet()) { override fun execute(context: BytecodeContext) { LithoFilterPatch.addFilter("$COMPONENTS_PATH/ChannelBarFilter;") + LithoFilterPatch.addFilter("$COMPONENTS_PATH/CustomFilter;") LithoFilterPatch.addFilter("$COMPONENTS_PATH/LayoutComponentsFilter;") /** diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index d7f3d0899..86066a286 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -80,6 +80,8 @@ Note: This feature hasn't been tested." Configure which components to filter, separated by new lines. Edit custom filter Invalid custom filter. Filter reset to default. + Invalid custom filter (must be ASCII only): %s. + Invalid custom filter: %s. Custom filter is disabled. Custom filter is enabled. Enable custom filter