mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-26 02:44:08 +01:00
Compare commits
4 Commits
v4.10.0-de
...
v4.10.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
550ac09e32 | ||
|
|
e2409213d4 | ||
|
|
a8b14d560f | ||
|
|
d5c0b5ed65 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
||||
# [4.10.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.5...v4.10.0-dev.6) (2024-06-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([#3317](https://github.com/ReVanced/revanced-patches/issues/3317)) ([9c4c4f0](https://github.com/ReVanced/revanced-patches/commit/9c4c4f05a762d745404101bbc3925ab4eba2deb8))
|
||||
|
||||
# [4.10.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.4...v4.10.0-dev.5) (2024-06-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([#3316](https://github.com/ReVanced/revanced-patches/issues/3316)) ([c05264a](https://github.com/ReVanced/revanced-patches/commit/c05264af3944cbfe8d9aa34fb0e0fddb05a1d42f))
|
||||
|
||||
# [4.10.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.3...v4.10.0-dev.4) (2024-06-08)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 4.10.0-dev.4
|
||||
version = 4.10.0-dev.6
|
||||
|
||||
@@ -62,9 +62,11 @@ object CommentsPatch : ResourcePatch() {
|
||||
PreferenceScreen(
|
||||
"revanced_comments_screen",
|
||||
preferences = setOf(
|
||||
SwitchPreference("revanced_hide_preview_comment"),
|
||||
SwitchPreference("revanced_hide_comments_by_members_header"),
|
||||
SwitchPreference("revanced_hide_comments_section"),
|
||||
SwitchPreference("revanced_hide_comment_timestamp_and_emoji_buttons")
|
||||
SwitchPreference("revanced_hide_comments_preview_comment"),
|
||||
SwitchPreference("revanced_hide_comments_thanks_button"),
|
||||
SwitchPreference("revanced_hide_comments_timestamp_and_emoji_buttons")
|
||||
),
|
||||
sorting = PreferenceScreen.Sorting.UNSORTED
|
||||
)
|
||||
|
||||
@@ -8,11 +8,14 @@ import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||
|
||||
object UserAgentClientSpoofPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
||||
private const val ORIGINAL_PACKAGE_NAME = "com.google.android.youtube"
|
||||
@@ -42,20 +45,31 @@ object UserAgentClientSpoofPatch : BaseTransformInstructionsPatch<Instruction35c
|
||||
as? OneRegisterInstruction ?: return
|
||||
).registerA
|
||||
|
||||
// IndexOutOfBoundsException is not possible here,
|
||||
// IndexOutOfBoundsException is possible here,
|
||||
// but no such occurrences are present in the app.
|
||||
val referee = getInstruction(instructionIndex + 2).getReference<MethodReference>()?.toString()
|
||||
|
||||
// This can technically also match non-user agent string builder append methods,
|
||||
// but no such occurrences are present in the app.
|
||||
// Only replace string builder usage.
|
||||
if (referee != USER_AGENT_STRING_BUILDER_APPEND_METHOD_REFERENCE) {
|
||||
return
|
||||
}
|
||||
|
||||
// Do not change the package name in methods that use resources, or for methods that use GmsCore.
|
||||
// Changing these package names will result in playback limitations,
|
||||
// particularly Android VR background audio only playback.
|
||||
val resourceOrGmsStringInstructionIndex = indexOfFirstInstruction {
|
||||
val reference = getReference<StringReference>()
|
||||
opcode == Opcode.CONST_STRING &&
|
||||
(reference?.string == "android.resource://" || reference?.string == "gcore_")
|
||||
}
|
||||
if (resourceOrGmsStringInstructionIndex >= 0) {
|
||||
return
|
||||
}
|
||||
|
||||
// Overwrite the result of context.getPackageName() with the original package name.
|
||||
replaceInstruction(
|
||||
instructionIndex + 1,
|
||||
"const-string v$targetRegister, \"${ORIGINAL_PACKAGE_NAME}\"",
|
||||
"const-string v$targetRegister, \"$ORIGINAL_PACKAGE_NAME\"",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,15 +502,21 @@
|
||||
<patch id="layout.hide.comments.CommentsPatch">
|
||||
<string name="revanced_comments_screen_title">Comments</string>
|
||||
<string name="revanced_comments_screen_summary">Hide or show comments section components</string>
|
||||
<string name="revanced_hide_preview_comment_title">Hide preview comment</string>
|
||||
<string name="revanced_hide_preview_comment_summary_on">Preview comment is hidden</string>
|
||||
<string name="revanced_hide_preview_comment_summary_off">Preview comment is shown</string>
|
||||
<string name="revanced_hide_comments_by_members_header_title">Hide \'Comments by members\' header</string>
|
||||
<string name="revanced_hide_comments_by_members_header_summary_on">\'Comments by members\' header is hidden</string>
|
||||
<string name="revanced_hide_comments_by_members_header_summary_off">\'Comments by members\' header is shown</string>
|
||||
<string name="revanced_hide_comments_section_title">Hide comments section</string>
|
||||
<string name="revanced_hide_comments_section_summary_on">Comment section is hidden</string>
|
||||
<string name="revanced_hide_comments_section_summary_off">Comment section is shown</string>
|
||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_title">Hide timestamp and emoji buttons</string>
|
||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_summary_on">Comment timestamp and emoji buttons are hidden</string>
|
||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_summary_off">Comment timestamp and emoji buttons are shown</string>
|
||||
<string name="revanced_hide_comments_section_summary_on">Comments section is hidden</string>
|
||||
<string name="revanced_hide_comments_section_summary_off">Comments section is shown</string>
|
||||
<string name="revanced_hide_comments_preview_comment_title">Hide preview comment</string>
|
||||
<string name="revanced_hide_comments_preview_comment_summary_on">Preview comment is hidden</string>
|
||||
<string name="revanced_hide_comments_preview_comment_summary_off">Preview comment is shown</string>
|
||||
<string name="revanced_hide_comments_thanks_button_title">Hide thanks button</string>
|
||||
<string name="revanced_hide_comments_thanks_button_summary_on">Thanks button is hidden</string>
|
||||
<string name="revanced_hide_comments_thanks_button_summary_off">Thanks button is shown</string>
|
||||
<string name="revanced_hide_comments_timestamp_and_emoji_buttons_title">Hide timestamp and emoji buttons</string>
|
||||
<string name="revanced_hide_comments_timestamp_and_emoji_buttons_summary_on">Timestamp and emoji buttons are hidden</string>
|
||||
<string name="revanced_hide_comments_timestamp_and_emoji_buttons_summary_off">Timestamp and emoji buttons are shown</string>
|
||||
</patch>
|
||||
<patch id="layout.hide.crowdfundingbox.CrowdfundingBoxResourcePatch">
|
||||
<string name="revanced_hide_crowdfunding_box_title">Hide crowdfunding box</string>
|
||||
|
||||
Reference in New Issue
Block a user