mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(YouTube/Overlay button): add Whitelist
overlay button
This commit is contained in:
@ -83,7 +83,8 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
"CopyVideoUrlTimestamp;",
|
||||
"ExternalDownload;",
|
||||
"SpeedDialog;",
|
||||
"TimeOrderedPlaylist;"
|
||||
"TimeOrderedPlaylist;",
|
||||
"Whitelists;"
|
||||
).forEach { className ->
|
||||
PlayerControlsPatch.hookOverlayButtons("$OVERLAY_BUTTONS_PATH/$className")
|
||||
}
|
||||
@ -110,11 +111,12 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
"quantum_ic_fullscreen_exit_white_24.png",
|
||||
"quantum_ic_fullscreen_grey600_24.png",
|
||||
"quantum_ic_fullscreen_white_24.png",
|
||||
"revanced_time_ordered_playlist.png",
|
||||
"revanced_time_ordered_playlist_icon.png",
|
||||
"revanced_copy_icon.png",
|
||||
"revanced_copy_icon_with_time.png",
|
||||
"revanced_download_icon.png",
|
||||
"revanced_speed_icon.png",
|
||||
"revanced_whitelist_icon.png",
|
||||
"yt_fill_arrow_repeat_white_24.png",
|
||||
"yt_outline_arrow_repeat_1_white_24.png",
|
||||
"yt_outline_arrow_shuffle_1_white_24.png",
|
||||
|
@ -12,6 +12,7 @@ import app.revanced.patches.youtube.utils.fingerprints.SeekbarOnDrawFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.TotalTimeFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.YouTubeControlsOverlayFingerprint
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.INTEGRATIONS_PATH
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.PATCH_STATUS_CLASS_DESCRIPTOR
|
||||
import app.revanced.patches.youtube.utils.playercontrols.PlayerControlsPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.InsetOverlayViewLayout
|
||||
@ -24,6 +25,7 @@ import app.revanced.util.getTargetIndexWithMethodReferenceName
|
||||
import app.revanced.util.getTargetIndexWithMethodReferenceNameReversed
|
||||
import app.revanced.util.getWideLiteralInstructionIndex
|
||||
import app.revanced.util.resultOrThrow
|
||||
import app.revanced.util.updatePatchStatus
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -172,5 +174,8 @@ object SponsorBlockBytecodePatch : BytecodePatch(
|
||||
|
||||
// Set current video id
|
||||
VideoInformationPatch.hook("$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JZ)V")
|
||||
|
||||
context.updatePatchStatus(PATCH_STATUS_CLASS_DESCRIPTOR, "SponsorBlock")
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user