refactor(youtube): move to correct package
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
f261e64b10
commit
1c6f30d061
|
@ -10,20 +10,20 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.autocaptions.annotations.AutoCaptionsCompatibility
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.StartVideoInformerFingerprint
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleTrackFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.captions.annotations.HideCaptionsButtonCompatibility
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("disable-auto-captions")
|
||||
@Description("Disable forced captions from being automatically enabled.")
|
||||
@AutoCaptionsCompatibility
|
||||
@HideCaptionsButtonCompatibility
|
||||
@Version("0.0.1")
|
||||
class AutoCaptionsPatch : BytecodePatch(
|
||||
listOf(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.buttons.annotations
|
||||
package app.revanced.patches.youtube.layout.buttons.action.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.buttons.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.action.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -13,7 +13,7 @@ import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
|||
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.buttons.annotations.HideButtonsCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.action.annotations.HideButtonsCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
|
@ -71,7 +71,7 @@ class HideButtonsPatch : ResourcePatch {
|
|||
false,
|
||||
StringResource("revanced_hide_share_button_summary_on", "Share button is hidden"),
|
||||
StringResource("revanced_hide_share_button_summaryoff", "Share button is shown")
|
||||
),
|
||||
)
|
||||
),
|
||||
StringResource("revanced_hide_buttons_summary", "Hide or show buttons under videos")
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.autoplaybutton.annotations
|
||||
package app.revanced.patches.youtube.layout.buttons.autoplay.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.autoplaybutton.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.autoplay.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.autoplaybutton.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.autoplay.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.autoplaybutton.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.autoplay.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -11,14 +11,14 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayButtonCompatibility
|
||||
import app.revanced.patches.youtube.layout.autoplaybutton.fingerprints.AutoNavInformerFingerprint
|
||||
import app.revanced.patches.youtube.layout.autoplaybutton.fingerprints.LayoutConstructorFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.buttons.autoplay.annotations.AutoplayButtonCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.autoplay.fingerprints.AutoNavInformerFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.autoplay.fingerprints.LayoutConstructorFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.iface.instruction.Instruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations
|
||||
package app.revanced.patches.youtube.layout.buttons.captions.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
@ -10,4 +10,4 @@ import app.revanced.patcher.annotation.Package
|
|||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class HideTimeAndSeekbarCompatibility
|
||||
internal annotation class HideCaptionsButtonCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidecaptionsbutton.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.captions.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -10,19 +10,19 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.autocaptions.annotations.AutoCaptionsCompatibility
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.captions.annotations.HideCaptionsButtonCompatibility
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("hide-captions-button")
|
||||
@Description("Hides the captions button on video player.")
|
||||
@AutoCaptionsCompatibility
|
||||
@HideCaptionsButtonCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideCaptionsButtonPatch : BytecodePatch(listOf(
|
||||
SubtitleButtonControllerFingerprint,
|
|
@ -1,9 +1,9 @@
|
|||
package app.revanced.patches.youtube.layout.castbutton.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class CastButtonCompatibility
|
||||
package app.revanced.patches.youtube.layout.buttons.cast.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class CastButtonCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.castbutton.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.cast.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -11,11 +11,11 @@ import app.revanced.patcher.patch.PatchResultError
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.castbutton.annotations.CastButtonCompatibility
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.buttons.cast.annotations.CastButtonCompatibility
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.createbutton.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.create.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.createbutton.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.create.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -14,12 +14,12 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.pivotbar.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.pivotbar.createbutton.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.resource.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.create.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.annotations
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.resource.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch.ResolvePivotBarFingerprintsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.resource.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -10,10 +10,10 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.layout.pivotbar.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.pivotbar.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.fingerprints.PivotBarConstructorFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.InitializeButtonsFingerprint
|
||||
|
||||
@DependsOn([ResourceMappingPatch::class])
|
||||
@PivotBarCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -13,13 +13,13 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.pivotbar.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.pivotbar.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.resource.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints.PivotBarEnumFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.pivotbar.utils
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.utils
|
||||
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.instruction
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.playerbuttonbackground.annotations
|
||||
package app.revanced.patches.youtube.layout.buttons.player.background.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.playerbuttonbackground.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.player.background.patch
|
||||
|
||||
import app.revanced.extensions.doRecursively
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -9,7 +9,7 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.playerbuttonbackground.annotations.PlayerButtonBackgroundCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.player.background.annotations.PlayerButtonBackgroundCompatibility
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.player.buttons.annotations
|
||||
package app.revanced.patches.youtube.layout.buttons.player.hide.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.player.buttons.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.player.hide.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.player.buttons.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.player.hide.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -14,8 +14,8 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.player.buttons.annotations.HidePlayerButtonsCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.buttons.fingerprints.PlayerControlsVisibilityModelFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.player.hide.annotations.HidePlayerButtonsCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.player.hide.fingerprints.PlayerControlsVisibilityModelFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction3rc
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidealbumcards.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.albumcards.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.hidealbumcards.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.hidealbumcards.resource.patch.AlbumCardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.albumcards.resource.patch.AlbumCardsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidealbumcards.bytecode.patch
|
||||
package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -11,9 +11,9 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.hidealbumcards.annotations.AlbumCardsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hidealbumcards.bytecode.fingerprints.AlbumCardsFingerprint
|
||||
import app.revanced.patches.youtube.layout.hidealbumcards.resource.patch.AlbumCardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.albumcards.annotations.AlbumCardsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.albumcards.bytecode.fingerprints.AlbumCardsFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.albumcards.resource.patch.AlbumCardsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidealbumcards.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.albumcards.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
|
@ -7,11 +7,11 @@ 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.patches.youtube.layout.hidealbumcards.annotations.AlbumCardsCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.albumcards.annotations.AlbumCardsCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Name("hide-album-cards-resource-patch")
|
||||
@AlbumCardsCompatibility
|
||||
|
@ -28,8 +28,8 @@ class AlbumCardsResourcePatch : ResourcePatch {
|
|||
"revanced_hide_album_cards",
|
||||
StringResource("revanced_hide_album_cards_title", "Hide album cards"),
|
||||
false,
|
||||
StringResource("revanced_hide_album_cards_summary_on", "Music album cards are hidden"),
|
||||
StringResource("revanced_hide_album_cards_summary_off", "Music album cards are shown")
|
||||
StringResource("revanced_hide_album_cards_summary_on", "Album cards are hidden"),
|
||||
StringResource("revanced_hide_album_cards_summary_off", "Album cards are shown")
|
||||
)
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.buttons.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.artistcards.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideartistcard.patch
|
||||
package app.revanced.patches.youtube.layout.hide.artistcards.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -9,12 +9,12 @@ 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.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.annotations.HideArtistCardCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.artistcards.annotations.HideArtistCardCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([ResourceMappingPatch::class, LithoFilterPatch::class])
|
||||
|
@ -22,15 +22,15 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
|||
@Description("Hides the artist card below the searchbar.")
|
||||
@HideArtistCardCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideArtistCardPatch : ResourcePatch {
|
||||
class HideArtistCardsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_artist_card",
|
||||
StringResource("revanced_hide_hide_artist_card_title", "Hide artist card"),
|
||||
"revanced_hide_artist_cards",
|
||||
StringResource("revanced_hide_artist_cards_title", "Hide artist cards"),
|
||||
false,
|
||||
StringResource("revanced_hide_hide_artist_card_on", "Artist card is hidden"),
|
||||
StringResource("revanced_hide_hide_artist_card_off", "Artist card is shown")
|
||||
StringResource("revanced_hide_artist_cards_on", "Artist cards is hidden"),
|
||||
StringResource("revanced_hide_artist_cards_off", "Artist cards is shown")
|
||||
),
|
||||
)
|
||||
return PatchResultSuccess()
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.homepage.breakingnews.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.breakingnews.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.homepage.breakingnews.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.resource.patch.BreakingNewsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.breakingnews.resource.patch.BreakingNewsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.homepage.breakingnews.bytecode.patch
|
||||
package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -11,9 +11,9 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.annotations.BreakingNewsCompatibility
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.bytecode.fingerprints.BreakingNewsFingerprint
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.resource.patch.BreakingNewsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.breakingnews.annotations.BreakingNewsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.fingerprints.BreakingNewsFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.breakingnews.resource.patch.BreakingNewsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.homepage.breakingnews.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.breakingnews.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
|
@ -8,9 +8,9 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Name("breaking-news-shelf-resource-patch")
|
||||
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.comments.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.comments.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,8 +1,8 @@
|
|||
package app.revanced.patches.youtube.layout.comments.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.comments.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.comments.resource.patch.CommentsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.comments.resource.patch.CommentsResourcePatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.comments.bytecode.patch
|
||||
package app.revanced.patches.youtube.layout.hide.comments.bytecode.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -13,9 +13,9 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.comments.annotations.CommentsCompatibility
|
||||
import app.revanced.patches.youtube.layout.comments.bytecode.fingerprints.ShortsCommentsButtonFingerprint
|
||||
import app.revanced.patches.youtube.layout.comments.resource.patch.CommentsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.comments.annotations.CommentsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.comments.bytecode.fingerprints.ShortsCommentsButtonFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.comments.resource.patch.CommentsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.comments.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.comments.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
|
@ -7,12 +7,12 @@ 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.patches.youtube.layout.comments.annotations.CommentsCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.comments.annotations.CommentsCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Name("comments-resource-patch")
|
||||
@CommentsCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidecrowdfundingbox.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.crowdfundingbox.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.hidecrowdfundingbox.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.hidecrowdfundingbox.resource.patch.CrowdfundingBoxResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.crowdfundingbox.resource.patch.CrowdfundingBoxResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidecrowdfundingbox.bytecode.patch
|
||||
package app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -11,9 +11,9 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.hidecrowdfundingbox.resource.patch.CrowdfundingBoxResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hidecrowdfundingbox.annotations.CrowdfundingBoxCompatibility
|
||||
import app.revanced.patches.youtube.layout.hidecrowdfundingbox.bytecode.fingerprints.CrowdfundingBoxFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.crowdfundingbox.annotations.CrowdfundingBoxCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.fingerprints.CrowdfundingBoxFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.crowdfundingbox.resource.patch.CrowdfundingBoxResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidecrowdfundingbox.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.crowdfundingbox.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
|
@ -7,11 +7,11 @@ 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.patches.youtube.layout.hidecrowdfundingbox.annotations.CrowdfundingBoxCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.crowdfundingbox.annotations.CrowdfundingBoxCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Name("crowdfunding-box-resource-patch")
|
||||
@CrowdfundingBoxCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideendscreencards.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.hideendscreencards.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.hideendscreencards.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.hideendscreencards.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideendscreencards.bytecode.patch
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -6,20 +6,17 @@ import app.revanced.patcher.annotation.Version
|
|||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.fingerprint.Fingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.annotations.HideEndscreenCardsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.bytecode.fingerprints.LayoutCircleFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.bytecode.fingerprints.LayoutIconFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.bytecode.fingerprints.LayoutVideoFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideendscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.annotations.HideEndscreenCardsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints.LayoutCircleFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints.LayoutIconFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints.LayoutVideoFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideendscreencards.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
|
@ -7,11 +7,11 @@ 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.patches.youtube.layout.hideendscreencards.annotations.HideEndscreenCardsCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.endscreencards.annotations.HideEndscreenCardsCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Name("hide-endscreen-cards-resource-patch")
|
||||
@HideEndscreenCardsCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideinfocards.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.infocards.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideinfocards.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.infocards.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideinfocards.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.infocards.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.hideinfocards.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.infocards.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideinfocards.resource.patch.HideInfocardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.resource.patch.HideInfocardsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideinfocards.patch
|
||||
package app.revanced.patches.youtube.layout.hide.infocards.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -6,7 +6,6 @@ import app.revanced.patcher.annotation.Version
|
|||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
|
@ -14,11 +13,11 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.layout.hideinfocards.annotations.HideInfocardsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hideinfocards.fingerprints.InfocardsIncognitoFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideinfocards.fingerprints.InfocardsIncognitoParentFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideinfocards.fingerprints.InfocardsMethodCallFingerprint
|
||||
import app.revanced.patches.youtube.layout.hideinfocards.resource.patch.HideInfocardsResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.annotations.HideInfocardsCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsIncognitoFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsIncognitoParentFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsMethodCallFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.resource.patch.HideInfocardsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hideinfocards.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.infocards.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
|
@ -6,11 +6,11 @@ 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.patches.youtube.layout.hideinfocards.annotations.HideInfocardsCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.annotations.HideInfocardsCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@HideInfocardsCompatibility
|
||||
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidemixplaylists.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.mixplaylists.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidemixplaylists.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidemixplaylists.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidemixplaylists.patch
|
||||
package app.revanced.patches.youtube.layout.hide.mixplaylists.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -7,18 +7,18 @@ import app.revanced.patcher.data.BytecodeContext
|
|||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patches.youtube.layout.hidemixplaylists.annotations.MixPlaylistsPatchCompatibility
|
||||
import app.revanced.patches.youtube.layout.hidemixplaylists.fingerprints.CreateMixPlaylistFingerprint
|
||||
import app.revanced.patches.youtube.layout.hidemixplaylists.fingerprints.SecondCreateMixPlaylistFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.mixplaylists.annotations.MixPlaylistsPatchCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints.CreateMixPlaylistFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints.SecondCreateMixPlaylistFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.personalinformation.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.personalinformation.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.youtube.layout.personalinformation.bytecode.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.personalinformation.resource.patch.HideEmailAddressResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.personalinformation.resource.patch.HideEmailAddressResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.personalinformation.bytecode.patch
|
||||
package app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -11,10 +11,9 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.layout.personalinformation.annotations.HideEmailAddressCompatibility
|
||||
import app.revanced.patches.youtube.layout.personalinformation.bytecode.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||
import app.revanced.patches.youtube.layout.personalinformation.resource.patch.HideEmailAddressResourcePatch
|
||||
import app.revanced.patches.youtube.layout.hide.personalinformation.annotations.HideEmailAddressCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.personalinformation.resource.patch.HideEmailAddressResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.personalinformation.resource.patch
|
||||
package app.revanced.patches.youtube.layout.hide.personalinformation.resource.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
|
@ -7,11 +7,11 @@ 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.patches.youtube.layout.personalinformation.annotations.HideEmailAddressCompatibility
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.personalinformation.annotations.HideEmailAddressCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Name("hide-email-address-resource-patch")
|
||||
@HideEmailAddressCompatibility
|
|
@ -0,0 +1,13 @@
|
|||
package app.revanced.patches.youtube.layout.hide.seekbar.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.49.37", "18.03.36")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class HideSeekbarCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidetimeandseekbar.patch
|
||||
package app.revanced.patches.youtube.layout.hide.seekbar.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -15,54 +15,36 @@ import app.revanced.patches.shared.fingerprints.SeekbarFingerprint
|
|||
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.seekbar.annotations.HideSeekbarCompatibility
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("hide-time-and-seekbar")
|
||||
@Description("Hides progress bar and time counter on videos.")
|
||||
@HideTimeAndSeekbarCompatibility
|
||||
@Name("hide-seekbar")
|
||||
@Description("Hides the seekbar.")
|
||||
@HideSeekbarCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideTimeAndSeekbarPatch : BytecodePatch(
|
||||
listOf(
|
||||
SeekbarFingerprint, TimeCounterFingerprint
|
||||
)
|
||||
class HideSeekbarPatch : BytecodePatch(
|
||||
listOf(SeekbarFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_time_and_seekbar",
|
||||
StringResource("revanced_hide_time_and_seekbar_title", "Hide time and seekbar"),
|
||||
"revanced_hide_seekbar",
|
||||
StringResource("revanced_hide_seekbar_title", "Hide seekbar"),
|
||||
false,
|
||||
StringResource("revanced_hide_time_and_seekbar_summary_on", "Time and seekbar are hidden"),
|
||||
StringResource("revanced_hide_time_and_seekbar_summary_off", "Time and seekbar are shown")
|
||||
StringResource("revanced_hide_seekbar_summary_on", "Seekbar is hidden"),
|
||||
StringResource("revanced_hide_seekbar_summary_off", "Seekbar is shown")
|
||||
)
|
||||
)
|
||||
|
||||
val createVideoPlayerSeekbarMethod = SeekbarFingerprint.result!!.let {
|
||||
SeekbarFingerprint.result!!.let {
|
||||
SeekbarOnDrawFingerprint.apply { resolve(context, it.mutableClass) }
|
||||
}.result!!.mutableMethod
|
||||
|
||||
createVideoPlayerSeekbarMethod.addInstructions(
|
||||
}.result!!.mutableMethod.addInstructions(
|
||||
0, """
|
||||
const/4 v0, 0x0
|
||||
invoke-static { }, Lapp/revanced/integrations/patches/HideTimeAndSeekbarPatch;->hideTimeAndSeekbar()Z
|
||||
move-result v0
|
||||
if-eqz v0, :hide_time_and_seekbar
|
||||
return-void
|
||||
:hide_time_and_seekbar
|
||||
nop
|
||||
"""
|
||||
)
|
||||
|
||||
val timeCounterMethod = TimeCounterFingerprint.result!!.mutableMethod
|
||||
|
||||
timeCounterMethod.addInstructions(
|
||||
0, """
|
||||
invoke-static { }, Lapp/revanced/integrations/patches/HideTimeAndSeekbarPatch;->hideTimeAndSeekbar()Z
|
||||
invoke-static { }, Lapp/revanced/integrations/patches/HideSeekbarPatch;->hideSeekbar()Z
|
||||
move-result v0
|
||||
if-eqz v0, :hide_time_and_seekbar
|
||||
return-void
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.reels.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.time.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
@ -10,4 +10,4 @@ import app.revanced.patcher.annotation.Package
|
|||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class HideReelsCompatibility
|
||||
internal annotation class HideTimeCompatibility
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.time.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
@ -0,0 +1,55 @@
|
|||
package app.revanced.patches.youtube.layout.hide.time.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.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.time.annotations.HideTimeCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.time.fingerprints.TimeCounterFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("hide-time")
|
||||
@Description("Hides the videos time.")
|
||||
@HideTimeCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideTimePatch : BytecodePatch(
|
||||
listOf(
|
||||
TimeCounterFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_time",
|
||||
StringResource("revanced_hide_time_title", "Hide time"),
|
||||
false,
|
||||
StringResource("revanced_hide_time_summary_on", "Time is hidden"),
|
||||
StringResource("revanced_hide_time_summary_off", "Time is shown")
|
||||
)
|
||||
)
|
||||
|
||||
TimeCounterFingerprint.result!!.mutableMethod.addInstructions(
|
||||
0, """
|
||||
invoke-static { }, Lapp/revanced/integrations/patches/HideTimeAndSeekbarPatch;->hideTimeAndSeekbar()Z
|
||||
move-result v0
|
||||
if-eqz v0, :hide_time_and_seekbar
|
||||
return-void
|
||||
:hide_time_and_seekbar
|
||||
nop
|
||||
"""
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watchinvr.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.watchinvr.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watchinvr.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.watchinvr.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watchinvr.patch
|
||||
package app.revanced.patches.youtube.layout.hide.watchinvr.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -12,8 +12,8 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.watchinvr.annotations.WatchinVRCompatibility
|
||||
import app.revanced.patches.youtube.layout.watchinvr.fingerprints.WatchInVRFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.watchinvr.annotations.WatchinVRCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.watchinvr.fingerprints.WatchInVRFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watermark.annotations
|
||||
package app.revanced.patches.youtube.layout.hide.watermark.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watermark.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.watermark.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watermark.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.watermark.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.watermark.patch
|
||||
package app.revanced.patches.youtube.layout.hide.watermark.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -13,13 +13,13 @@ import app.revanced.patcher.patch.PatchResultError
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.watermark.annotations.HideWatermarkCompatibility
|
||||
import app.revanced.patches.youtube.layout.watermark.fingerprints.HideWatermarkFingerprint
|
||||
import app.revanced.patches.youtube.layout.watermark.fingerprints.HideWatermarkParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.watermark.annotations.HideWatermarkCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.watermark.fingerprints.HideWatermarkFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.watermark.fingerprints.HideWatermarkParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.playerpopuppanels.annotations
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.popup.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.playerpopuppanels.fingerprints
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.popup.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.playerpopuppanels.patch
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.popup.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -13,8 +13,8 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.playerpopuppanels.annotations.PlayerPopupPanelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.playerpopuppanels.fingerprints.EngagementPanelControllerFingerprint
|
||||
import app.revanced.patches.youtube.layout.panels.fullscreen.popup.annotations.PlayerPopupPanelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.panels.fullscreen.popup.fingerprints.EngagementPanelControllerFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.fullscreenpanels.annotations
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.remove.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.fullscreenpanels.fingerprints
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.fullscreenpanels.fingerprints
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.fullscreenpanels.patch
|
||||
package app.revanced.patches.youtube.layout.panels.fullscreen.remove.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
|
@ -13,13 +13,13 @@ import app.revanced.patcher.patch.PatchResultError
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.fullscreenpanels.annotations.FullscreenPanelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreenpanels.fingerprints.FullscreenViewAdderFingerprint
|
||||
import app.revanced.patches.youtube.layout.fullscreenpanels.fingerprints.FullscreenViewAdderParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.panels.fullscreen.remove.annotations.FullscreenPanelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints.FullscreenViewAdderFingerprint
|
||||
import app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints.FullscreenViewAdderParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@Name("disable-fullscreen-panels")
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.widesearchbar.annotations
|
||||
package app.revanced.patches.youtube.layout.searchbar.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
package app.revanced.patches.youtube.layout.searchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
package app.revanced.patches.youtube.layout.searchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
@ -1,4 +1,4 @@
|
|||
package app.revanced.patches.youtube.layout.widesearchbar.patch
|
||||
package app.revanced.patches.youtube.layout.searchbar.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
|
@ -16,9 +16,9 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.DrawActionBarFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.SetWordmarkHeaderFingerprint
|
||||
import app.revanced.patches.youtube.layout.searchbar.annotations.WideSearchbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.searchbar.fingerprints.DrawActionBarFingerprint
|
||||
import app.revanced.patches.youtube.layout.searchbar.fingerprints.SetWordmarkHeaderFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
|
@ -10,16 +10,16 @@ import app.revanced.patcher.patch.PatchResult
|
|||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.startupshortsreset.annotations.StartupShortsResetCompatibility
|
||||
import app.revanced.patches.youtube.layout.startupshortsreset.fingerprints.UserWasInShortsFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("disable-startup-shorts-player")
|
||||
@Name("disable-shorts-on-startup")
|
||||
@Description("Disables playing YouTube Shorts when launching YouTube.")
|
||||
@StartupShortsResetCompatibility
|
||||
@Version("0.0.1")
|
||||
|
|
|
@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint
|
||||
import app.revanced.patches.youtube.layout.castbutton.patch.HideCastButtonPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.cast.patch.HideCastButtonPatch
|
||||
import app.revanced.patches.youtube.misc.fix.spoof.patch.ClientSpoofPatch
|
||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
||||
import app.revanced.patches.youtube.misc.microg.fingerprints.*
|
||||
|
|
Loading…
Reference in a new issue