mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-27 12:41:03 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ffa3b4746 | ||
|
|
1e6d0f7f62 | ||
|
|
e73c5dfebd | ||
|
|
32309ac007 | ||
|
|
079800aa1a | ||
|
|
06f0d05d19 | ||
|
|
c618a18851 | ||
|
|
1aac521af3 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
|||||||
|
## [2.85.1](https://github.com/revanced/revanced-patches/compare/v2.85.0...v2.85.1) (2022-10-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/theme:** extend dark mode theming ([#827](https://github.com/revanced/revanced-patches/issues/827)) ([6d803c5](https://github.com/revanced/revanced-patches/commit/6d803c5386e1f6f6fb6a7fa0a9f0bb81ee1022ac))
|
||||||
|
|
||||||
|
# [2.85.0](https://github.com/revanced/revanced-patches/compare/v2.84.1...v2.85.0) (2022-10-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** `hide-captions-button` patch ([#770](https://github.com/revanced/revanced-patches/issues/770)) ([478af6a](https://github.com/revanced/revanced-patches/commit/478af6ad54ffdf6f99abab35a84a4f50b59d28c8))
|
||||||
|
|
||||||
|
## [2.84.1](https://github.com/revanced/revanced-patches/compare/v2.84.0...v2.84.1) (2022-10-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/hide-mix-playlists:** correct switch title, summary and defaults ([#821](https://github.com/revanced/revanced-patches/issues/821)) ([f9eea33](https://github.com/revanced/revanced-patches/commit/f9eea332cea0b8c3d5c3dfff645b60861e925b5a))
|
||||||
|
|
||||||
|
# [2.84.0](https://github.com/revanced/revanced-patches/compare/v2.83.3...v2.84.0) (2022-10-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** `hide-mix-playlists` patch ([#816](https://github.com/revanced/revanced-patches/issues/816)) ([e76c73b](https://github.com/revanced/revanced-patches/commit/e76c73b455c65aa605e418f19d88b64e0e244901))
|
||||||
|
|
||||||
## [2.83.3](https://github.com/revanced/revanced-patches/compare/v2.83.2...v2.83.3) (2022-10-20)
|
## [2.83.3](https://github.com/revanced/revanced-patches/compare/v2.83.2...v2.83.3) (2022-10-20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
|
||||||
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.36.37 |
|
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.36.37 |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
||||||
|
| `hide-captions-button` | Hides the captions button on video player. | 17.36.37 |
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
|
||||||
| `hide-create-button` | Hides the create button in the navigation bar. | 17.36.37 |
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.36.37 |
|
||||||
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.36.37 |
|
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.36.37 |
|
||||||
@@ -82,6 +83,7 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `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 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
|
||||||
|
| `hide-my-mix` | Removes mix playlists from the feed. | 17.40.41 |
|
||||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.83.3
|
version = 2.85.1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidecaptionsbutton.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.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.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
|
@Name("hide-captions-button")
|
||||||
|
@Description("Hides the captions button on video player.")
|
||||||
|
@AutoCaptionsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HideCaptionsButtonPatch : BytecodePatch(listOf(
|
||||||
|
SubtitleButtonControllerFingerprint,
|
||||||
|
)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_captions_button",
|
||||||
|
StringResource("revanced_hide_captions_button_title", "Hide captions button"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_hide_captions_button_summary_on", "Captions button is hidden"),
|
||||||
|
StringResource("revanced_hide_captions_button_summary_off", "Captions button is shown")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val subtitleButtonControllerMethod = SubtitleButtonControllerFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
// Due to previously applied patches, scanResult index cannot be used in this context
|
||||||
|
val igetBooleanIndex = subtitleButtonControllerMethod.implementation!!.instructions.indexOfFirst {
|
||||||
|
it.opcode == Opcode.IGET_BOOLEAN
|
||||||
|
}
|
||||||
|
|
||||||
|
subtitleButtonControllerMethod.addInstructions(
|
||||||
|
igetBooleanIndex + 1, """
|
||||||
|
invoke-static {v0}, Lapp/revanced/integrations/patches/HideCaptionsButtonPatch;->hideCaptionsButton(Landroid/widget/ImageView;)V
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidemixplaylists.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.32.39", "17.34.36", "17.36.37", "17.36.39", "17.37.35", "17.38.36", "17.39.35", "17.40.41")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class MixPlaylistsPatchCompatibility
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidemixplaylists.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.hidemixplaylists.annotations.MixPlaylistsPatchCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("mix-playlists-fingerprint")
|
||||||
|
@MixPlaylistsPatchCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object MixPlaylistsPatchFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L", "L", "L"), listOf(
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.RETURN_VOID
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidemixplaylists.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.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.MixPlaylistsPatchFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
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])
|
||||||
|
@Name("hide-my-mix")
|
||||||
|
@Description("Removes mix playlists from the feed.")
|
||||||
|
@MixPlaylistsPatchCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class MixPlaylistsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
MixPlaylistsPatchFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_mix_playlists_hidden",
|
||||||
|
StringResource("revanced_mix_playlists_title", "Hide mix playlists"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_mix_playlists_summary_on", "Mix playlists are hidden"),
|
||||||
|
StringResource("revanced_mix_playlists_summary_off", "Mix playlists are shown")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val result = MixPlaylistsPatchFingerprint.result!!
|
||||||
|
val method = result.mutableMethod
|
||||||
|
val index = result.scanResult.patternScanResult!!.endIndex - 6
|
||||||
|
val register = (method.implementation!!.instructions[index] as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
|
method.addInstruction(
|
||||||
|
index + 2,
|
||||||
|
"invoke-static {v$register}, Lapp/revanced/integrations/patches/HideMixPlaylistsPatch;->hideMixPlaylists(Landroid/view/View;)V"
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,7 +30,8 @@ class ThemePatch : ResourcePatch {
|
|||||||
|
|
||||||
node.textContent = when (node.getAttribute("name")) {
|
node.textContent = when (node.getAttribute("name")) {
|
||||||
"yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3", "yt_black4",
|
"yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3", "yt_black4",
|
||||||
"yt_status_bar_background_dark" -> darkThemeBackgroundColor
|
"yt_status_bar_background_dark", "material_grey_100", "material_grey_50", "material_grey_600",
|
||||||
|
"material_grey_800", "material_grey_850", "material_grey_900", "material_grey_white_1000" -> darkThemeBackgroundColor
|
||||||
|
|
||||||
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98", "yt_white2", "yt_white3",
|
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98", "yt_white2", "yt_white3",
|
||||||
"yt_white4" -> lightThemeBackgroundColor
|
"yt_white4" -> lightThemeBackgroundColor
|
||||||
|
|||||||
Reference in New Issue
Block a user