mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +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
|
||||
&& skippingSegments.length === 1
|
||||
&& skippingSegments[0].actionType === ActionType.Poi) {
|
||||
waitFor(() => skipButtonControlBar).then(() => {
|
||||
skipButtonControlBar.enable(skippingSegments[0]);
|
||||
if (isOnMobileYouTube() || Config.config.skipKeybind == null) skipButtonControlBar.setShowKeybindHint(false);
|
||||
|
||||
activeSkipKeybindElement?.setShowKeybindHint(false);
|
||||
activeSkipKeybindElement = skipButtonControlBar;
|
||||
})
|
||||
} else {
|
||||
if (openNotice) {
|
||||
//send out the message saying that a sponsor message was skipped
|
||||
|
||||
Reference in New Issue
Block a user