mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-04 08:34:27 +02:00
add hide-live-chat-button
patch (for old layout)
This commit is contained in:
parent
b086822adb
commit
ca02b06a21
@ -0,0 +1,44 @@
|
||||
package app.revanced.patches.youtube.layout.player.livechatbutton.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.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.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.playerbutton.patch.PlayerButtonPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@Name("hide-live-chat-button")
|
||||
@Description("Hides the live chat button in the video player (for old layout).")
|
||||
@DependsOn(
|
||||
[
|
||||
PlayerButtonPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideLiveChatButtonPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
/*
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"PREFERENCE: PLAYER_SETTINGS",
|
||||
"SETTINGS: HIDE_LIVE_CHATS_BUTTON"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("hide-live-chat-button")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -13,6 +13,10 @@
|
||||
<string name="revanced_hide_comments_thanks_button_summary_on">@string/revanced_hide_button_thanks_summary_on</string>
|
||||
<string name="revanced_hide_comments_thanks_button_title">@string/revanced_hide_button_thanks_title</string>
|
||||
|
||||
<string name="revanced_hide_live_chat_button_summary_off">@string/revanced_hide_button_live_chat_summary_off</string>
|
||||
<string name="revanced_hide_live_chat_button_summary_on">@string/revanced_hide_button_live_chat_summary_on</string>
|
||||
<string name="revanced_hide_live_chat_button_title">@string/revanced_hide_button_live_chat_title</string>
|
||||
|
||||
<string name="revanced_hide_quick_actions_dislike_summary_off">@string/revanced_hide_button_dislike_summary_off</string>
|
||||
<string name="revanced_hide_quick_actions_dislike_summary_on">@string/revanced_hide_button_dislike_summary_on</string>
|
||||
<string name="revanced_hide_quick_actions_dislike_title">@string/revanced_hide_button_dislike_title</string>
|
||||
|
@ -168,6 +168,9 @@
|
||||
<!-- SETTINGS: HIDE_CAST_BUTTON
|
||||
<SwitchPreference android:title="@string/revanced_hide_cast_button_title" android:key="revanced_hide_cast_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_cast_button_summary_on" android:summaryOff="@string/revanced_hide_cast_button_summary_off" />SETTINGS: HIDE_CAST_BUTTON -->
|
||||
|
||||
<!-- SETTINGS: HIDE_LIVE_CHATS_BUTTON
|
||||
<SwitchPreference android:title="@string/revanced_hide_live_chat_button_title" android:key="revanced_hide_live_chat_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_live_chat_button_summary_on" android:summaryOff="@string/revanced_hide_live_chat_button_summary_off" />SETTINGS: HIDE_LIVE_CHATS_BUTTON -->
|
||||
|
||||
<!-- SETTINGS: HIDE_CAPTIONS_BUTTON
|
||||
<SwitchPreference android:title="@string/revanced_hide_captions_button_title" android:key="revanced_hide_captions_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_captions_button_summary_on" android:summaryOff="@string/revanced_hide_captions_button_summary_off" />SETTINGS: HIDE_CAPTIONS_BUTTON -->
|
||||
|
||||
@ -480,6 +483,7 @@
|
||||
<Preference android:title="hide-music-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-autoplay-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-cast-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-live-chat-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-captions-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-previous-next-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-player-button-background" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user