-
-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(youtube): add
hide-shorts-components
patch
- Loading branch information
Showing
14 changed files
with
265 additions
and
176 deletions.
There are no files selected for viewing
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
17 changes: 0 additions & 17 deletions
17
...p/revanced/patches/youtube/ad/general/bytecode/fingerprints/ReelConstructorFingerprint.kt
This file was deleted.
Oops, something went wrong.
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
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
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
17 changes: 0 additions & 17 deletions
17
...hes/youtube/layout/hide/comments/bytecode/fingerprints/ShortsCommentsButtonFingerprint.kt
This file was deleted.
Oops, something went wrong.
75 changes: 0 additions & 75 deletions
75
.../kotlin/app/revanced/patches/youtube/layout/hide/comments/bytecode/patch/CommentsPatch.kt
This file was deleted.
Oops, something went wrong.
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
8 changes: 8 additions & 0 deletions
8
...anced/patches/youtube/layout/hide/shorts/annotations/HideShortsComponentsCompatibility.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,8 @@ | ||
package app.revanced.patches.youtube.layout.hide.shorts.annotations | ||
|
||
import app.revanced.patcher.annotation.Compatibility | ||
import app.revanced.patcher.annotation.Package | ||
|
||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37"))]) | ||
@Target(AnnotationTarget.CLASS) | ||
internal annotation class HideShortsComponentsCompatibility |
19 changes: 19 additions & 0 deletions
19
...atches/youtube/layout/hide/shorts/bytecode/fingerprints/CreateShortsButtonsFingerprint.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,19 @@ | ||
package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints | ||
|
||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint | ||
import app.revanced.patches.youtube.layout.hide.shorts.resource.patch.HideShortsComponentsResourcePatch | ||
import org.jf.dexlib2.Opcode | ||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction | ||
|
||
object CreateShortsButtonsFingerprint : MethodFingerprint( | ||
parameters = listOf("Z", "Z", "L"), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.implementation?.instructions?.any { | ||
if (it.opcode != Opcode.CONST) return@any false | ||
|
||
val literal = (it as WideLiteralInstruction).wideLiteral | ||
|
||
literal == HideShortsComponentsResourcePatch.reelPlayerRightLargeIconSize | ||
} ?: false | ||
} | ||
) |
19 changes: 19 additions & 0 deletions
19
...ed/patches/youtube/layout/hide/shorts/bytecode/fingerprints/ReelConstructorFingerprint.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,19 @@ | ||
package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints | ||
|
||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint | ||
import app.revanced.patches.youtube.layout.hide.shorts.resource.patch.HideShortsComponentsResourcePatch | ||
import org.jf.dexlib2.Opcode | ||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction | ||
|
||
object ReelConstructorFingerprint : MethodFingerprint( | ||
opcodes = listOf(Opcode.INVOKE_VIRTUAL), | ||
customFingerprint = { method, _ -> | ||
method.implementation?.instructions?.any { | ||
if (it.opcode != Opcode.CONST) return@any false | ||
|
||
val literal = (it as WideLiteralInstruction).wideLiteral | ||
|
||
literal == HideShortsComponentsResourcePatch.reelMultipleItemShelfId | ||
} ?: false | ||
} | ||
) |
Oops, something went wrong.