mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
add hide-collapse-button
patch
This commit is contained in:
@ -0,0 +1,45 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.player.collapsebutton.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-collapse-button")
|
||||||
|
@Description("Hides the collapse button in the video player.")
|
||||||
|
@DependsOn(
|
||||||
|
[
|
||||||
|
PlayerButtonPatch::class,
|
||||||
|
SettingsPatch::class
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@YouTubeCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HideCollapseButtonPatch : ResourcePatch {
|
||||||
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add settings
|
||||||
|
*/
|
||||||
|
SettingsPatch.addPreference(
|
||||||
|
arrayOf(
|
||||||
|
"PREFERENCE: OTHER_LAYOUT_SETTINGS",
|
||||||
|
"PREFERENCE_HEADER: PLAYER",
|
||||||
|
"SETTINGS: HIDE_COLLAPSE_BUTTON"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
SettingsPatch.updatePatchStatus("hide-live-chat-button")
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
@ -168,6 +168,9 @@
|
|||||||
<!-- SETTINGS: HIDE_LIVE_CHATS_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 -->
|
<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_COLLAPSE_BUTTON
|
||||||
|
<SwitchPreference android:title="@string/revanced_hide_collapse_button_title" android:key="revanced_hide_collapse_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_collapse_button_summary_on" android:summaryOff="@string/revanced_hide_collapse_button_summary_off" />SETTINGS: HIDE_COLLAPSE_BUTTON -->
|
||||||
|
|
||||||
<!-- SETTINGS: HIDE_NEXT_BUTTON
|
<!-- SETTINGS: HIDE_NEXT_BUTTON
|
||||||
<SwitchPreference android:title="@string/revanced_hide_next_button_title" android:key="revanced_hide_next_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_next_button_summary_on" android:summaryOff="@string/revanced_hide_next_button_summary_off" />SETTINGS: HIDE_NEXT_BUTTON -->
|
<SwitchPreference android:title="@string/revanced_hide_next_button_title" android:key="revanced_hide_next_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_next_button_summary_on" android:summaryOff="@string/revanced_hide_next_button_summary_off" />SETTINGS: HIDE_NEXT_BUTTON -->
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user