mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-19 17:13:59 +00:00
Compare commits
6 Commits
v2.192.0-d
...
v2.193.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d65ef676d | ||
|
|
0424cea8f0 | ||
|
|
f5acbe4315 | ||
|
|
992d85ded8 | ||
|
|
f25d085d25 | ||
|
|
002cc9d810 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
|||||||
|
# [2.193.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.1...v2.193.0-dev.2) (2023-10-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Add `Disable fine scrubbing gesture` patch ([6c9baf2](https://github.com/ReVanced/revanced-patches/commit/6c9baf22614b1be4870be684915445f7a138cf31))
|
||||||
|
|
||||||
|
# [2.193.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.192.0...v2.193.0-dev.1) (2023-10-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Hide shorts components:** Hide subscribe button when paused separately from subscribe button ([52d07ec](https://github.com/ReVanced/revanced-patches/commit/52d07ecd39b1c37cfbfbfa699ccbef849600d9f8))
|
||||||
|
|
||||||
|
# [2.192.0](https://github.com/ReVanced/revanced-patches/compare/v2.191.0...v2.192.0) (2023-10-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Relay for Reddit - Spoof client:** Prevent OAuth login being disabled remotely ([a0aa2be](https://github.com/ReVanced/revanced-patches/commit/a0aa2be86d25aab2803901b4100fdc75461e94bc))
|
||||||
|
* Remove `dependencies` from generated JSON file ([79bb3e1](https://github.com/ReVanced/revanced-patches/commit/79bb3e164f84094c639ac9e567dc0a5ce70300bd))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **TikTok:** Constrain patches to last working version ([066023c](https://github.com/ReVanced/revanced-patches/commit/066023ca148b413b0848c0939e0bab2b3ff32b3a))
|
||||||
|
* **YouTube - Hide "Get YouTube Premium" advertisements:** Name patch correctly ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([5c140ea](https://github.com/ReVanced/revanced-patches/commit/5c140ea38dc7b7da1efd4b98315fb401267b99f8))
|
||||||
|
|
||||||
# [2.192.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.192.0-dev.2...v2.192.0-dev.3) (2023-10-05)
|
# [2.192.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.192.0-dev.2...v2.192.0-dev.3) (2023-10-05)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.192.0-dev.3
|
version = 2.193.0-dev.2
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,64 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.seekbar
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
|
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.IsSwipingUpFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Disable fine scrubbing gesture",
|
||||||
|
description = "Disables gesture that shows the fine scrubbing overlay when swiping up on the seekbar.",
|
||||||
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube",
|
||||||
|
[
|
||||||
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object DisableFineScrubbingGesturePatch : BytecodePatch(
|
||||||
|
setOf(IsSwipingUpFingerprint)
|
||||||
|
) {
|
||||||
|
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
||||||
|
"Lapp/revanced/integrations/patches/DisableFineScrubbingGesturePatch;->" +
|
||||||
|
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_disable_fine_scrubbing_gesture",
|
||||||
|
StringResource("revanced_disable_fine_scrubbing_gesture_title", "Disable fine scrubbing gesture"),
|
||||||
|
StringResource("revanced_disable_fine_scrubbing_gesture_summary_on", "Gesture is disabled"),
|
||||||
|
StringResource("revanced_disable_fine_scrubbing_gesture_summary_off", "Gesture is enabled"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
IsSwipingUpFingerprint.result?.let {
|
||||||
|
val addMovementIndex = it.scanResult.patternScanResult!!.startIndex - 1
|
||||||
|
|
||||||
|
it.mutableMethod.apply {
|
||||||
|
val addMovementInstruction = getInstruction<FiveRegisterInstruction>(addMovementIndex)
|
||||||
|
val trackerRegister = addMovementInstruction.registerC
|
||||||
|
val eventRegister = addMovementInstruction.registerD
|
||||||
|
|
||||||
|
replaceInstruction(
|
||||||
|
addMovementIndex,
|
||||||
|
"invoke-static {v$trackerRegister, v$eventRegister}, $INTEGRATIONS_METHOD_DESCRIPTOR"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: throw IsSwipingUpFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,9 +8,12 @@ import app.revanced.patcher.patch.BytecodePatch
|
|||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.OnTouchEventHandlerFingerprint
|
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.OnTouchEventHandlerFingerprint
|
||||||
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint
|
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
@@ -19,9 +22,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
name = "Seekbar tapping",
|
name = "Seekbar tapping",
|
||||||
description = "Enables tap-to-seek on the seekbar of the video player.",
|
description = "Enables tap-to-seek on the seekbar of the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class, SettingsPatch::class],
|
||||||
EnableSeekbarTappingResourcePatch::class
|
|
||||||
],
|
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
"com.google.android.youtube",
|
"com.google.android.youtube",
|
||||||
@@ -45,6 +46,15 @@ object EnableSeekbarTappingPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_seekbar_tapping",
|
||||||
|
StringResource("revanced_seekbar_tapping_title", "Enable seekbar tapping"),
|
||||||
|
StringResource("revanced_seekbar_tapping_summary_on", "Seekbar tapping is enabled"),
|
||||||
|
StringResource("revanced_seekbar_tapping_summary_off", "Seekbar tapping is disabled")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
// Find the required methods to tap the seekbar.
|
// Find the required methods to tap the seekbar.
|
||||||
val seekbarTappingMethods = OnTouchEventHandlerFingerprint.result?.let {
|
val seekbarTappingMethods = OnTouchEventHandlerFingerprint.result?.let {
|
||||||
val patternScanResult = it.scanResult.patternScanResult!!
|
val patternScanResult = it.scanResult.patternScanResult!!
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.interaction.seekbar
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
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.SettingsPatch
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
dependencies = [SettingsPatch::class]
|
|
||||||
)
|
|
||||||
object EnableSeekbarTappingResourcePatch : ResourcePatch() {
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_seekbar_tapping",
|
|
||||||
StringResource("revanced_seekbar_tapping_title", "Enable seekbar tapping"),
|
|
||||||
StringResource("revanced_seekbar_tapping_summary_on", "Seekbar tapping is enabled"),
|
|
||||||
StringResource("revanced_seekbar_tapping_summary_off", "Seekbar tapping is disabled")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object IsSwipingUpFingerprint : MethodFingerprint(
|
||||||
|
parameters = listOf("Landroid/view/MotionEvent;", "J"),
|
||||||
|
opcodes = listOf(Opcode.SGET_OBJECT)
|
||||||
|
)
|
||||||
@@ -38,6 +38,12 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
|
|||||||
StringResource("revanced_hide_shorts_subscribe_button_on", "Subscribe button is hidden"),
|
StringResource("revanced_hide_shorts_subscribe_button_on", "Subscribe button is hidden"),
|
||||||
StringResource("revanced_hide_shorts_subscribe_button_off", "Subscribe button is shown")
|
StringResource("revanced_hide_shorts_subscribe_button_off", "Subscribe button is shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_shorts_subscribe_button_paused",
|
||||||
|
StringResource("revanced_hide_shorts_subscribe_button_paused_title", "Hide subscribe button when paused"),
|
||||||
|
StringResource("revanced_hide_shorts_subscribe_button_paused_on", "Subscribe button is hidden"),
|
||||||
|
StringResource("revanced_hide_shorts_subscribe_button_paused_off", "Subscribe button is shown")
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_shorts_thanks_button",
|
"revanced_hide_shorts_thanks_button",
|
||||||
StringResource("revanced_hide_shorts_thanks_button_title", "Hide thanks button"),
|
StringResource("revanced_hide_shorts_thanks_button_title", "Hide thanks button"),
|
||||||
|
|||||||
Reference in New Issue
Block a user