mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 09:53:55 +01:00
Compare commits
7 Commits
v2.201.0-d
...
v2.201.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2753b2999 | ||
|
|
6268d14212 | ||
|
|
576563a27b | ||
|
|
6cb43c3326 | ||
|
|
89300e1f42 | ||
|
|
094ffd1b34 | ||
|
|
7f15bb4c20 |
33
CHANGELOG.md
33
CHANGELOG.md
@@ -1,3 +1,36 @@
|
||||
# [2.201.0](https://github.com/ReVanced/revanced-patches/compare/v2.200.0...v2.201.0) (2023-11-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Enable tablet layout:** Respect the original device layout ([b2c5bab](https://github.com/ReVanced/revanced-patches/commit/b2c5babf3fd9ad73daa06e03f4830a9dd7199d0c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide ads:** Hide shopping links in video description ([0c875a1](https://github.com/ReVanced/revanced-patches/commit/0c875a106308ae9747ae998d75b84db1c336762b))
|
||||
* **YouTube - Hide layout components:** Hide "For You" shelf in channel page ([2bc7485](https://github.com/ReVanced/revanced-patches/commit/2bc7485cda5c5e17d65419faca983567a030f9aa))
|
||||
|
||||
# [2.201.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.200.0...v2.201.0-dev.1) (2023-11-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Enable tablet layout:** Respect the original device layout ([b2c5bab](https://github.com/ReVanced/revanced-patches/commit/b2c5babf3fd9ad73daa06e03f4830a9dd7199d0c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide ads:** Hide shopping links in video description ([0c875a1](https://github.com/ReVanced/revanced-patches/commit/0c875a106308ae9747ae998d75b84db1c336762b))
|
||||
* **YouTube - Hide layout components:** Hide "For You" shelf in channel page ([2bc7485](https://github.com/ReVanced/revanced-patches/commit/2bc7485cda5c5e17d65419faca983567a030f9aa))
|
||||
|
||||
## [2.200.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.200.0...v2.200.1-dev.1) (2023-11-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Enable tablet layout:** Respect the original device layout ([1eb12cc](https://github.com/ReVanced/revanced-patches/commit/1eb12cc40ac5c25410dac9857ff4a9585c25f5cc))
|
||||
|
||||
# [2.200.0](https://github.com/ReVanced/revanced-patches/compare/v2.199.0...v2.200.0) (2023-11-22)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 2.200.0
|
||||
version = 2.201.0
|
||||
|
||||
@@ -55,6 +55,12 @@ object HideAdsResourcePatch : ResourcePatch() {
|
||||
StringResource("revanced_hide_products_banner_summary_on", "Banner is hidden"),
|
||||
StringResource("revanced_hide_products_banner_summary_off", "Banner is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_shopping_links",
|
||||
StringResource("revanced_hide_shopping_links_title", "Hide shopping links in video description"),
|
||||
StringResource("revanced_hide_shopping_links_summary_on", "Shopping links are hidden"),
|
||||
StringResource("revanced_hide_shopping_links_summary_off", "Shopping links are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_web_search_results",
|
||||
StringResource("revanced_hide_web_search_results_title", "Hide web search results"),
|
||||
|
||||
@@ -74,6 +74,12 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
||||
StringResource("revanced_hide_channel_watermark_title_summary_on", "Watermark is hidden"),
|
||||
StringResource("revanced_hide_channel_watermark_title_summary_off", "Watermark is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_for_you_shelf",
|
||||
StringResource("revanced_hide_for_you_shelf_title", "Hide \\\'For you\\\' shelf in channel page"),
|
||||
StringResource("revanced_hide_for_you_shelf_summary_on", "Shelf is hidden"),
|
||||
StringResource("revanced_hide_for_you_shelf_summary_off", "Shelf is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_notify_me_button",
|
||||
StringResource("revanced_hide_notify_me_button_title", "Hide \\\'Notify me\\\' button"),
|
||||
|
||||
@@ -2,8 +2,11 @@ package app.revanced.patches.youtube.layout.tablet
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
@@ -13,6 +16,8 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.tablet.fingerprints.GetFormFactorFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction10x
|
||||
|
||||
@Patch(
|
||||
name = "Enable tablet layout",
|
||||
@@ -37,18 +42,28 @@ object EnableTabletLayoutPatch : BytecodePatch(
|
||||
|
||||
GetFormFactorFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val returnLargeFormFactorIndex = it.scanResult.patternScanResult!!.endIndex - 4
|
||||
val returnCurrentFormFactorIndex = getInstructions().lastIndex - 2
|
||||
|
||||
val returnIsLargeFormFactorLabel = getInstruction(returnCurrentFormFactorIndex - 2)
|
||||
val returnFormFactorIndex = getInstruction(returnCurrentFormFactorIndex)
|
||||
|
||||
val insertIndex = returnCurrentFormFactorIndex + 1
|
||||
|
||||
// Replace the labeled instruction with a nop and add the preserved instructions back
|
||||
replaceInstruction(returnCurrentFormFactorIndex, BuilderInstruction10x(Opcode.NOP))
|
||||
addInstruction(insertIndex, returnFormFactorIndex)
|
||||
|
||||
// Because the labeled instruction is now a nop, we can add our own instructions right after it
|
||||
addInstructionsWithLabels(
|
||||
0,
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/integrations/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z
|
||||
move-result v0
|
||||
invoke-static { }, Lapp/revanced/integrations/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z
|
||||
move-result v0 # Free register
|
||||
if-nez v0, :is_large_form_factor
|
||||
""",
|
||||
ExternalLabel(
|
||||
"is_large_form_factor",
|
||||
getInstruction(returnLargeFormFactorIndex)
|
||||
returnIsLargeFormFactorLabel
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user