mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-28 13:11:03 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c0fd8a6da | ||
|
|
e34d67f01e | ||
|
|
72703d6a56 | ||
|
|
b8c473796a |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [2.89.0](https://github.com/revanced/revanced-patches/compare/v2.88.0...v2.89.0) (2022-10-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `hide-album-cards` patch ([#857](https://github.com/revanced/revanced-patches/issues/857)) ([bce9d0c](https://github.com/revanced/revanced-patches/commit/bce9d0c9405d7afd5c51c2a9c2c247f3ff7581f5))
|
||||||
|
|
||||||
|
# [2.88.0](https://github.com/revanced/revanced-patches/compare/v2.87.0...v2.88.0) (2022-10-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `hide-artist-card` patch ([#859](https://github.com/revanced/revanced-patches/issues/859)) ([1f76246](https://github.com/revanced/revanced-patches/commit/1f7624680b86e3a7afd45521bfef86f88f52c976))
|
||||||
|
|
||||||
# [2.87.0](https://github.com/revanced/revanced-patches/compare/v2.86.0...v2.87.0) (2022-10-25)
|
# [2.87.0](https://github.com/revanced/revanced-patches/compare/v2.86.0...v2.87.0) (2022-10-25)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,9 +84,11 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
|
||||||
|
| `hide-album-cards` | Hides the album cards below the artist description. | 17.36.37 |
|
||||||
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.36.37 |
|
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.36.37 |
|
||||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
|
||||||
|
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.36.37 |
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
|
||||||
| `theme` | Applies a custom theme. | all |
|
| `theme` | Applies a custom theme. | all |
|
||||||
| `hide-email-address` | Hides the email address in the account switcher. | 17.36.37 |
|
| `hide-email-address` | Hides the email address in the account switcher. | 17.36.37 |
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.87.0
|
version = 2.89.0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidealbumcards.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class AlbumCardsCompatibility
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidealbumcards.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hidealbumcards.annotations.AlbumCardsCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("album-cards-view-fingerprint")
|
||||||
|
@AlbumCardsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object AlbumCardsFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
listOf("L", "L", "L", "L", "L", "L", "[B"),
|
||||||
|
listOf(
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.CONST,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.CHECK_CAST,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidealbumcards.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.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
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.youtube.layout.hidealbumcards.annotations.AlbumCardsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.hidealbumcards.fingerprints.AlbumCardsFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class, ResourceMappingResourcePatch::class])
|
||||||
|
@Name("hide-album-cards")
|
||||||
|
@Description("Hides the album cards below the artist description.")
|
||||||
|
@AlbumCardsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class AlbumCardsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
AlbumCardsFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_album_cards",
|
||||||
|
StringResource("revanced_hide_album_cards_title", "Hide the album cards"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_hide_album_cards_summary_on", "Album cards is hidden"),
|
||||||
|
StringResource("revanced_hide_album_cards_summary_off", "Album cards is visible")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val albumCardsResult = AlbumCardsFingerprint.result!!
|
||||||
|
val albumCardsMethod = albumCardsResult.mutableMethod
|
||||||
|
|
||||||
|
val checkCastIndex = albumCardsResult.scanResult.patternScanResult!!.endIndex
|
||||||
|
val patchIndex = checkCastIndex + 1
|
||||||
|
|
||||||
|
albumCardsMethod.addInstruction(
|
||||||
|
patchIndex, """
|
||||||
|
invoke-static {v${(albumCardsMethod.instruction(checkCastIndex) as OneRegisterInstruction).registerA}}, Lapp/revanced/integrations/patches/HideAlbumCardsPatch;->hideAlbumCards(Landroid/view/View;)V
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.buttons.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class HideArtistCardCompatibility
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hideartistcard.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
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.ad.general.bytecode.patch.GeneralBytecodeAdsPatch
|
||||||
|
import app.revanced.patches.youtube.layout.buttons.annotations.HideArtistCardCompatibility
|
||||||
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([ResourceMappingResourcePatch::class, GeneralBytecodeAdsPatch::class])
|
||||||
|
@Name("hide-artist-card")
|
||||||
|
@Description("Hides the artist card below the searchbar.")
|
||||||
|
@HideArtistCardCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HideArtistCardPatch : 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"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_hide_hide_artist_card_on", "Artist card is hidden"),
|
||||||
|
StringResource("revanced_hide_hide_artist_card_off", "Artist card is shown")
|
||||||
|
),
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user