fix(YouTube - SponsorBlock): Do not hide voting or create button when the video ends
This logic is no longer needed, since YouTube no longer hides the overlay buttons when the video ends
This commit is contained in:
+1
-11
@@ -202,7 +202,7 @@ val sponsorBlockPatch = bytecodePatch(
|
||||
"""
|
||||
invoke-static { v$register }, $EXTENSION_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->appendTimeWithoutSegments(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$register
|
||||
""",
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
@@ -252,15 +252,5 @@ val sponsorBlockPatch = bytecodePatch(
|
||||
}
|
||||
} ?: throw PatchException("Could not find the method which contains the replaceMeWith* strings")
|
||||
}
|
||||
|
||||
// The vote and create segment buttons automatically change their visibility when appropriate,
|
||||
// but if buttons are showing when the end of the video is reached then they will not automatically hide.
|
||||
// Add a hook to forcefully hide when the end of the video is reached.
|
||||
autoRepeatFingerprint.match(autoRepeatParentFingerprint.originalClassDef).method.addInstruction(
|
||||
0,
|
||||
"invoke-static {}, $EXTENSION_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->endOfVideoReached()V",
|
||||
)
|
||||
|
||||
// TODO: Channel whitelisting.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user