mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
cleanup
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
@ -14,7 +14,7 @@ object CrowdfundingBoxFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.donationCompanionResourceId
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.donationCompanionResourceId
|
||||
} == true
|
||||
}
|
||||
)
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints.CrowdfundingBoxFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@DependsOn(
|
||||
[
|
||||
SettingsPatch::class,
|
||||
SharedResourcdIdPatch::class
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
@ -14,7 +14,7 @@ object FloatingMicrophoneFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.fabLabelId
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.fabLabelId
|
||||
} == true
|
||||
}
|
||||
)
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints.FloatingMicrophoneFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@DependsOn(
|
||||
[
|
||||
SettingsPatch::class,
|
||||
SharedResourcdIdPatch::class
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
|
@ -61,7 +61,7 @@ class HeaderSwitchPatch : BytecodePatch() {
|
||||
"""
|
||||
)
|
||||
|
||||
patchSuccessArray[0] = true;
|
||||
patchSuccessArray[0] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.general.personalinformation.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
@ -18,7 +18,7 @@ object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { it ->
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.accountSwitcherAccessibilityLabelId
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.accountSwitcherAccessibilityLabelId
|
||||
} == true
|
||||
}
|
||||
)
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.general.pivotbar.createbutton.finger
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
@ -19,7 +19,7 @@ object PivotBarFingerprint : MethodFingerprint(
|
||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" &&
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.imageWithTextTabId
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.imageWithTextTabId
|
||||
} == true
|
||||
}
|
||||
)
|
@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.fingerprints.PivotBarFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
@ -27,7 +27,7 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
@DependsOn(
|
||||
[
|
||||
SettingsPatch::class,
|
||||
SharedResourcdIdPatch::class
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
|
@ -15,7 +15,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
@ -27,7 +27,7 @@ import app.revanced.util.pivotbar.InjectionUtils.injectHook
|
||||
@DependsOn(
|
||||
[
|
||||
SettingsPatch::class,
|
||||
SharedResourcdIdPatch::class
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
|
@ -64,7 +64,7 @@ class ShortsComponentPatch : BytecodePatch() {
|
||||
val viewRegister = (instructions.elementAt(index + 3) as OneRegisterInstruction).registerA
|
||||
mutableMethod.implementation!!.injectHideCall(index + 4, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerCommentsButton")
|
||||
|
||||
patchSuccessArray[0] = true;
|
||||
patchSuccessArray[0] = true
|
||||
}
|
||||
|
||||
resourceIds[1] -> { // shorts player remix
|
||||
@ -77,7 +77,7 @@ class ShortsComponentPatch : BytecodePatch() {
|
||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||
mutableMethod.implementation!!.injectHideCall(index - 1, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerRemixButton")
|
||||
|
||||
patchSuccessArray[1] = true;
|
||||
patchSuccessArray[1] = true
|
||||
}
|
||||
|
||||
resourceIds[2] -> { // shorts player subscriptions banner
|
||||
@ -90,7 +90,7 @@ class ShortsComponentPatch : BytecodePatch() {
|
||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerSubscriptionsButton")
|
||||
|
||||
patchSuccessArray[2] = true;
|
||||
patchSuccessArray[2] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ class HideStoriesPatch : BytecodePatch() {
|
||||
val viewRegister = (iPutInstruction as Instruction22c).registerA
|
||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideStoriesShelf")
|
||||
|
||||
patchSuccessArray[0] = true;
|
||||
patchSuccessArray[1] = true;
|
||||
patchSuccessArray[0] = true
|
||||
patchSuccessArray[1] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprint
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
@ -13,7 +13,7 @@ object MiniPlayerDimensionsCalculatorFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.floatybarQueueLabelId
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.floatyBarQueueLabelId
|
||||
} == true
|
||||
}
|
||||
)
|
@ -17,7 +17,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprints.*
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
@ -29,7 +29,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@DependsOn(
|
||||
[
|
||||
SettingsPatch::class,
|
||||
SharedResourcdIdPatch::class
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
@ -105,7 +105,7 @@ class TabletMiniPlayerPatch : BytecodePatch(
|
||||
val parameterRegister = (instruction as OneRegisterInstruction).registerA
|
||||
this.insertOverride(index, parameterRegister)
|
||||
this.insertOverride(insertInstructions.size - 1, parameterRegister)
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user