Skip to content

Commit

Permalink
feat(YouTube - Hide Shorts components): Add option to hide like fount…
Browse files Browse the repository at this point in the history
…ain (ReVanced#3731)

Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
  • Loading branch information
oSumAtrIX and LisoUseInAIKyrios authored Oct 2, 2024
1 parent d56e216 commit 00a99dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
// since this Setting menu currently uses the ordering used here.

// Vertical row of buttons on right side of the screen.
SwitchPreference("revanced_hide_shorts_like_fountain"),
SwitchPreference("revanced_hide_shorts_like_button"),
SwitchPreference("revanced_hide_shorts_dislike_button"),
SwitchPreference("revanced_hide_shorts_comments_button"),
Expand Down Expand Up @@ -59,7 +60,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
context.xmlEditor["res/xml/main_shortcuts.xml"].use { editor ->
val shortsItem = editor.file.childNodes.findElementByAttributeValueOrThrow(
"android:shortcutId",
"shorts-shortcut"
"shorts-shortcut",
)

shortsItem.parentNode.removeChild(shortsItem)
Expand All @@ -70,7 +71,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
context.xmlEditor["res/layout/appwidget_two_rows.xml"].use { editor ->
val shortsItem = editor.file.childNodes.findElementByAttributeValueOrThrow(
"android:id",
"@id/button_shorts_container"
"@id/button_shorts_container",
)

shortsItem.parentNode.removeChild(shortsItem)
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/addresources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,9 @@ This is because Crowdin requires temporarily flattening this file and removing t
<string name="revanced_hide_shorts_stickers_title">Hide stickers</string>
<string name="revanced_hide_shorts_stickers_summary_on">Stickers are hidden</string>
<string name="revanced_hide_shorts_stickers_summary_off">Stickers are shown</string>
<string name="revanced_hide_shorts_like_fountain_title">Hide like fountain</string>
<string name="revanced_hide_shorts_like_fountain_summary_on">Like button fountain animation is hidden</string>
<string name="revanced_hide_shorts_like_fountain_summary_off">Like button fountain animation is shown</string>
<string name="revanced_hide_shorts_like_button_title">Hide like button</string>
<string name="revanced_hide_shorts_like_button_summary_on">Like button is hidden</string>
<string name="revanced_hide_shorts_like_button_summary_off">Like button is shown</string>
Expand Down

0 comments on commit 00a99dd

Please sign in to comment.