mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Fixed preview bar bar loading too early
This commit is contained in:
@@ -238,8 +238,10 @@ function videoIDChange(id) {
|
|||||||
//setup the preview bar
|
//setup the preview bar
|
||||||
if (previewBar == null) {
|
if (previewBar == null) {
|
||||||
//create it
|
//create it
|
||||||
|
wait(getControls).then(result => {
|
||||||
let progressBar = document.getElementsByClassName("ytp-progress-bar-container")[0] || document.getElementsByClassName("no-model cue-range-markers")[0];
|
let progressBar = document.getElementsByClassName("ytp-progress-bar-container")[0] || document.getElementsByClassName("no-model cue-range-markers")[0];
|
||||||
previewBar = new PreviewBar(progressBar);
|
previewBar = new PreviewBar(progressBar);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//warn them if they had unsubmitted times
|
//warn them if they had unsubmitted times
|
||||||
@@ -271,7 +273,7 @@ function videoIDChange(id) {
|
|||||||
sponsorsLookup(id);
|
sponsorsLookup(id);
|
||||||
|
|
||||||
//make sure everything is properly added
|
//make sure everything is properly added
|
||||||
updateVisibilityOfPlayerControlsButton(true);
|
updateVisibilityOfPlayerControlsButton();
|
||||||
|
|
||||||
//reset sponsor times submitting
|
//reset sponsor times submitting
|
||||||
sponsorTimesSubmitting = [];
|
sponsorTimesSubmitting = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user