generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(youtube/return-youtube-dislike): support for shorts (#1596)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de> Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
- Loading branch information
1 parent
3278f5b
commit 967c1cb
Showing
4 changed files
with
147 additions
and
47 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
.../youtube/layout/returnyoutubedislike/fingerprints/ShortsTextComponentParentFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint | ||
import org.jf.dexlib2.AccessFlags | ||
import org.jf.dexlib2.Opcode | ||
|
||
object ShortsTextComponentParentFingerprint : MethodFingerprint( | ||
returnType = "V", | ||
access = AccessFlags.PROTECTED or AccessFlags.FINAL, | ||
parameters = listOf("L", "L"), | ||
opcodes = listOf( | ||
Opcode.IF_EQZ, | ||
Opcode.CONST_4, | ||
Opcode.IF_EQ, | ||
Opcode.CONST_4, | ||
Opcode.IF_EQ, | ||
Opcode.RETURN_VOID, | ||
Opcode.IGET_OBJECT, | ||
Opcode.CHECK_CAST, | ||
Opcode.IGET_BOOLEAN, | ||
Opcode.IF_EQZ, | ||
Opcode.INVOKE_STATIC | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 22 additions & 7 deletions
29
.../kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
package app.revanced.patches.youtube.misc.video.videoid.fingerprint | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint | ||
import org.jf.dexlib2.AccessFlags | ||
import org.jf.dexlib2.Opcode | ||
|
||
@FuzzyPatternScanMethod(2) | ||
object VideoIdFingerprint : MethodFingerprint( | ||
"V", | ||
AccessFlags.DECLARED_SYNCHRONIZED or AccessFlags.FINAL or AccessFlags.PUBLIC, | ||
listOf("L"), | ||
listOf(Opcode.INVOKE_INTERFACE), | ||
customFingerprint = { | ||
it.definingClass.endsWith("PlaybackLifecycleMonitor;") | ||
} | ||
returnType = "V", | ||
access = AccessFlags.PUBLIC or AccessFlags.FINAL, | ||
parameters = listOf("L"), | ||
opcodes = listOf( | ||
Opcode.IF_EQZ, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.IF_EQZ, | ||
Opcode.IGET_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT_OBJECT | ||
), | ||
null, | ||
{ it.definingClass.endsWith("SubtitlesOverlayPresenter;") } | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters