fix: Remove version numbers from individual patches (#2709)

This commit is contained in:
LisoUseInAIKyrios
2023-07-28 22:11:23 +04:00
committed by GitHub
parent d1ccf093cc
commit d97f3990c9
177 changed files with 14 additions and 355 deletions
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.autocaptions.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -25,7 +24,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Disable auto captions")
@Description("Disable forced captions from being automatically enabled.")
@HideCaptionsButtonCompatibility
@Version("0.0.1")
class AutoCaptionsPatch : BytecodePatch(
listOf(
StartVideoInformerFingerprint, SubtitleButtonControllerFingerprint, SubtitleTrackFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.branding.header.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.PatchResultError
@@ -18,7 +17,6 @@ import kotlin.io.path.exists
@Name("Premium heading")
@Description("Shows premium branding on the home screen.")
@PremiumHeadingCompatibility
@Version("0.0.1")
class PremiumHeadingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
val resDirectory = context["res"]
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.branding.icon.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.*
import app.revanced.patcher.patch.annotations.Patch
@@ -16,7 +15,6 @@ import java.nio.file.Files
@Name("Custom branding")
@Description("Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).")
@CustomBrandingCompatibility
@Version("0.0.1")
class CustomBrandingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
fun copyResources(resourceGroups: List<ResourceUtils.ResourceGroup>) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.action.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
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide video action buttons")
@Description("Adds the options to hide action buttons under a video.")
@HideButtonsCompatibility
@Version("0.0.1")
class HideButtonsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -4,7 +4,6 @@ import app.revanced.extensions.findIndexForIdResource
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -31,7 +30,6 @@ import org.jf.dexlib2.iface.reference.MethodReference
@Name("Hide autoplay button")
@Description("Hides the autoplay button in the video player.")
@AutoplayButtonCompatibility
@Version("0.0.1")
class HideAutoplayButtonPatch : BytecodePatch(
listOf(LayoutConstructorFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.captions.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import org.jf.dexlib2.Opcode
@Name("Hide captions button")
@Description("Hides the captions button on video player.")
@HideCaptionsButtonCompatibility
@Version("0.0.1")
class HideCaptionsButtonPatch : BytecodePatch(listOf(
SubtitleButtonControllerFingerprint,
)) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.cast.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide cast button")
@Description("Hides the cast button in the video player.")
@CastButtonCompatibility
@Version("0.0.1")
class HideCastButtonPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -36,7 +35,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Navigation buttons")
@Description("Adds options to hide or change navigation buttons.")
@NavigationButtonsCompatibility
@Version("0.0.1")
class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.Pivot
@DependsOn([ResourceMappingPatch::class])
@Description("Resolves necessary fingerprints.")
@Version("0.0.1")
class ResolvePivotBarFingerprintsPatch : BytecodePatch(
listOf(PivotBarConstructorFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.player.hide.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -25,7 +24,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction3rc
@Name("Hide player buttons")
@Description("Adds the option to hide video player previous and next buttons.")
@HidePlayerButtonsCompatibility
@Version("0.0.1")
class HidePlayerButtonsPatch : BytecodePatch(
listOf(PlayerControlsVisibilityModelFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Hide album cards")
@Description("Hides the album cards below the artist description.")
@AlbumCardsCompatibility
@Version("0.0.1")
class AlbumCardsPatch : BytecodePatch(
listOf(
AlbumCardsFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Hide breaking news shelf")
@Description("Hides the breaking news shelf on the homepage tab.")
@BreakingNewsCompatibility
@Version("0.0.1")
class BreakingNewsPatch : BytecodePatch(
listOf(BreakingNewsFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.comments.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
@@ -21,7 +20,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Description("Hides components related to comments.")
@HideCommentsCompatibility
@DependsOn([SettingsPatch::class, LithoFilterPatch::class])
@Version("0.0.1")
class CommentsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Name("Hide crowdfunding box")
@Description("Hides the crowdfunding box between the player and video description.")
@CrowdfundingBoxCompatibility
@Version("0.0.1")
class CrowdfundingBoxPatch : BytecodePatch(
listOf(
CrowdfundingBoxFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -26,7 +25,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c
@Name("Hide endscreen cards")
@Description("Hides the suggested video cards at the end of a video in fullscreen.")
@HideEndscreenCardsCompatibility
@Version("0.0.1")
class HideEndscreenCardsPatch : BytecodePatch(
listOf(
LayoutCircleFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.filterbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -25,7 +24,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hides the filter bar in video feeds.")
@DependsOn([HideFilterBarResourcePatch::class])
@HideFilterBar
@Version("0.0.1")
class HideFilterBarPatch : BytecodePatch(
listOf(
RelatedChipCloudFingerprint,
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.filterbar.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -13,7 +12,6 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideFilterBarResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hides the floating microphone button which appears in search.")
@DependsOn([HideFloatingMicrophoneButtonResourcePatch::class])
@HideFloatingMicrophoneButtonCompatibility
@Version("0.0.1")
class HideFloatingMicrophoneButtonPatch : BytecodePatch(
listOf(ShowFloatingMicrophoneButtonFingerprint)
) {
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
@@ -15,7 +14,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@HideFloatingMicrophoneButtonCompatibility
@Version("0.0.1")
class HideFloatingMicrophoneButtonResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.general.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -28,7 +27,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.P
@Description("Hides general layout components.")
@DependsOn([LithoFilterPatch::class, SettingsPatch::class])
@HideLayoutComponentsCompatibility
@Version("0.0.1")
class HideLayoutComponentsPatch : BytecodePatch(
listOf(ConvertElementToFlatBufferFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.infocards.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -29,7 +28,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Name("Hide info cards")
@Description("Hides info cards in videos.")
@HideInfocardsCompatibility
@Version("0.0.1")
class HideInfoCardsPatch : BytecodePatch(
listOf(
InfocardsIncognitoParentFingerprint,
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.infocards.resource.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -14,7 +13,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@HideInfocardsCompatibility
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideInfocardsResourcePatch : ResourcePatch {
internal companion object {
var drawerResourceId: Long = -1
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -22,7 +21,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Hides the button under videos that loads similar videos.")
@DependsOn([HideLoadMoreButtonResourcePatch::class])
@HideLoadMoreButtonCompatibility
@Version("0.0.1")
class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
HideLoadMoreButtonFingerprint.result?.let {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.pa
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Hide email address")
@Description("Hides the email address in the account switcher.")
@HideEmailAddressCompatibility
@Version("0.0.1")
class HideEmailAddressPatch : BytecodePatch(
listOf(
AccountSwitcherAccessibilityLabelFingerprint
@@ -4,7 +4,6 @@ import app.revanced.extensions.indexOfFirstConstantInstructionValue
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Hides the dark background overlay from the player when player controls are visible.")
@DependsOn([HidePlayerOverlayResourcePatch::class])
@HidePlayerOverlayPatchCompatibility
@Version("0.0.2")
class HidePlayerOverlayPatch : BytecodePatch(listOf(CreatePlayerOverviewFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
CreatePlayerOverviewFingerprint.result?.let { result ->
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.seekbar.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
@@ -33,7 +32,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide seekbar")
@Description("Hides the seekbar.")
@HideSeekbarCompatibility
@Version("0.0.1")
class HideSeekbarPatch : BytecodePatch(
listOf(SeekbarFingerprint)
) {
@@ -5,7 +5,6 @@ import app.revanced.extensions.injectHideViewCall
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -38,7 +37,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Name("Hide Shorts components")
@Description("Hides components from YouTube Shorts.")
@HideShortsComponentsCompatibility
@Version("0.0.1")
class HideShortsComponentsPatch : BytecodePatch(
listOf(
CreateShortsButtonsFingerprint,
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.shorts.resource.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -13,7 +12,6 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideShortsComponentsResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.time.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide timestamp")
@Description("Hides timestamp in video player.")
@HideTimeCompatibility
@Version("0.0.1")
class HideTimestampPatch : BytecodePatch(
listOf(
TimeCounterFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.watchinvr.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide watch in VR")
@Description("Hides the option to watch in VR from the player settings flyout panel.")
@WatchInVRCompatibility
@Version("0.0.1")
class WatchInVRPatch : BytecodePatch(
listOf(
WatchInVRFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.watermark.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -26,7 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide watermark")
@Description("Hides creator's watermarks on videos.")
@HideWatermarkCompatibility
@Version("0.0.1")
class HideWatermarkPatch : BytecodePatch(
listOf(
HideWatermarkParentFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.panels.fullscreen.remove.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -26,7 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Description("Disables video description and comments panel in fullscreen view.")
@FullscreenPanelsCompatibility
@Version("0.0.1")
class FullscreenPanelsRemoverPatch : BytecodePatch(
listOf(
FullscreenViewAdderParentFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.panels.popup.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Disable player popup panels")
@Description("Disables panels from appearing automatically when going into fullscreen (playlist or live chat).")
@PlayerPopupPanelsCompatibility
@Version("0.0.1")
class PlayerPopupPanelsPatch : BytecodePatch(
listOf(
EngagementPanelControllerFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.player.background.patch
import app.revanced.extensions.doRecursively
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
@@ -16,7 +15,6 @@ import org.w3c.dom.Element
@Name("Remove player controls background")
@Description("Removes the background from the video player controls.")
@PlayerControlsBackgroundCompatibility
@Version("0.0.1")
class PlayerControlsBackgroundPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor[RESOURCE_FILE_PATH].use { editor ->
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -42,7 +41,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Name("Return YouTube Dislike")
@Description("Shows the dislike count of videos using the Return YouTube Dislike API.")
@ReturnYouTubeDislikeCompatibility
@Version("0.0.1")
class ReturnYouTubeDislikePatch : BytecodePatch(
listOf(
TextComponentConstructorFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.searchbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -27,7 +26,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Wide searchbar")
@Description("Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.")
@WideSearchbarCompatibility
@Version("0.0.1")
class WideSearchbarPatch : BytecodePatch(
listOf(
SetWordmarkHeaderFingerprint, CreateSearchSuggestionsFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.seekbar.bytecode.patch
import app.revanced.extensions.indexOfFirstConstantInstructionValue
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -27,7 +26,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hide or set a custom seekbar color")
@DependsOn([IntegrationsPatch::class, LithoColorHookPatch::class, SeekbarColorResourcePatch::class])
@SeekbarColorCompatibility
@Version("0.0.1")
class SeekbarColorBytecodePatch : BytecodePatch(
listOf(PlayerSeekbarColorFingerprint, ShortsSeekbarColorFingerprint, SetSeekbarClickedColorFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.sponsorblock.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
@@ -56,7 +55,6 @@ import org.jf.dexlib2.iface.reference.StringReference
@Name("SponsorBlock")
@Description("Integrates SponsorBlock which allows skipping video segments such as sponsored content.")
@SponsorBlockCompatibility
@Version("0.0.1")
class SponsorBlockBytecodePatch : BytecodePatch(
listOf(
SeekbarFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.spoofappversion.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -26,7 +25,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Spoof app version")
@Description("Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI.")
@SpoofAppVersionCompatibility
@Version("0.0.1")
class SpoofAppVersionPatch : BytecodePatch(
listOf(
SpoofAppVersionFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.startupshortsreset.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Disable Shorts on startup")
@Description("Disables playing YouTube Shorts when launching YouTube.")
@StartupShortsResetCompatibility
@Version("0.0.1")
class DisableShortsOnStartupPatch : BytecodePatch(
listOf(
UserWasInShortsFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
@@ -29,7 +28,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Tablet mini player")
@Description("Enables the tablet mini player layout.")
@TabletMiniPlayerCompatibility
@Version("0.0.1")
class TabletMiniPlayerPatch : BytecodePatch(
listOf(
MiniPlayerDimensionsCalculatorParentFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.theme.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.LithoThem
@Name("Litho color hook")
@Description("Adds a hook to set color of Litho components.")
@ThemeCompatibility
@Version("0.0.1")
class LithoColorHookPatch : BytecodePatch(listOf(LithoThemeFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
LithoThemeFingerprint.result?.let {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.theme.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.DependsOn
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.layout.theme.resource.ThemeResourcePatch
@Description("Applies a custom theme.")
@DependsOn([LithoColorHookPatch::class, SeekbarColorBytecodePatch::class, ThemeResourcePatch::class])
@ThemeCompatibility
@Version("0.0.1")
class ThemeBytecodePatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {