mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Wait for skip button control bar to be setup before using it
This commit is contained in:
@@ -1766,11 +1766,13 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
|
|||||||
if (!autoSkip
|
if (!autoSkip
|
||||||
&& skippingSegments.length === 1
|
&& skippingSegments.length === 1
|
||||||
&& skippingSegments[0].actionType === ActionType.Poi) {
|
&& skippingSegments[0].actionType === ActionType.Poi) {
|
||||||
skipButtonControlBar.enable(skippingSegments[0]);
|
waitFor(() => skipButtonControlBar).then(() => {
|
||||||
if (isOnMobileYouTube() || Config.config.skipKeybind == null) skipButtonControlBar.setShowKeybindHint(false);
|
skipButtonControlBar.enable(skippingSegments[0]);
|
||||||
|
if (isOnMobileYouTube() || Config.config.skipKeybind == null) skipButtonControlBar.setShowKeybindHint(false);
|
||||||
|
|
||||||
activeSkipKeybindElement?.setShowKeybindHint(false);
|
activeSkipKeybindElement?.setShowKeybindHint(false);
|
||||||
activeSkipKeybindElement = skipButtonControlBar;
|
activeSkipKeybindElement = skipButtonControlBar;
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
if (openNotice) {
|
if (openNotice) {
|
||||||
//send out the message saying that a sponsor message was skipped
|
//send out the message saying that a sponsor message was skipped
|
||||||
|
|||||||
Reference in New Issue
Block a user