Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(YouTube - Hide Shorts components): Add option to hide like fountain #3731

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 fountain is hidden</string>
<string name="revanced_hide_shorts_like_fountain_summary_off">Like fountain 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
Loading