feat(YouTube - Custom filter): Custom filtering of the protocol buffer (#2682)
This commit is contained in:
parent
b9bdeca99b
commit
872a5b6d89
|
@ -59,6 +59,9 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
||||||
"Lapp/revanced/integrations/youtube/patches/components/LayoutComponentsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/LayoutComponentsFilter;"
|
||||||
private const val DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME =
|
private const val DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME =
|
||||||
"Lapp/revanced/integrations/youtube/patches/components/DescriptionComponentsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/DescriptionComponentsFilter;"
|
||||||
|
private const val CUSTOM_FILTER_CLASS_NAME =
|
||||||
|
"Lapp/revanced/integrations/youtube/patches/components/CustomFilter;"
|
||||||
|
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
AddResourcesPatch(this::class)
|
AddResourcesPatch(this::class)
|
||||||
|
@ -116,6 +119,7 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
||||||
|
|
||||||
LithoFilterPatch.addFilter(LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR)
|
LithoFilterPatch.addFilter(LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR)
|
||||||
LithoFilterPatch.addFilter(DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME)
|
LithoFilterPatch.addFilter(DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME)
|
||||||
|
LithoFilterPatch.addFilter(CUSTOM_FILTER_CLASS_NAME)
|
||||||
|
|
||||||
// region Mix playlists
|
// region Mix playlists
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,9 @@
|
||||||
<string name="revanced_custom_filter_strings_title">Custom filter</string>
|
<string name="revanced_custom_filter_strings_title">Custom filter</string>
|
||||||
<string name="revanced_custom_filter_strings_summary">List of component path builder strings to filter separated by new line</string>
|
<string name="revanced_custom_filter_strings_summary">List of component path builder strings to filter separated by new line</string>
|
||||||
<string name="revanced_custom_filter_preference_screen_summary">Hide components using custom filters</string>
|
<string name="revanced_custom_filter_preference_screen_summary">Hide components using custom filters</string>
|
||||||
|
<string name="revanced_custom_filter_toast_invalid_characters">Invalid custom filter (must be ASCII only): %s</string>
|
||||||
|
<string name="revanced_custom_filter_toast_invalid_syntax">Invalid custom filter: %s</string>
|
||||||
|
<string name="revanced_custom_filter_toast_reset">Custom filter reset to default</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="ad.general.HideAdsResourcePatch">
|
<patch id="ad.general.HideAdsResourcePatch">
|
||||||
<string name="revanced_hide_general_ads_title">Hide general ads</string>
|
<string name="revanced_hide_general_ads_title">Hide general ads</string>
|
||||||
|
|
Loading…
Reference in a new issue