mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Properly added submissions to sponsor times when done.
This commit is contained in:
parent
0a84dbd3a5
commit
a66c7c8063
1 changed files with 6 additions and 3 deletions
|
@ -992,6 +992,8 @@ function sendSubmitMessage(){
|
|||
|
||||
let currentVideoID = sponsorVideoID;
|
||||
|
||||
let currentSponsorTimes = submitSponsorTimes;
|
||||
|
||||
chrome.runtime.sendMessage({
|
||||
message: "submitTimes",
|
||||
videoID: currentVideoID
|
||||
|
@ -1015,10 +1017,11 @@ function sendSubmitMessage(){
|
|||
|
||||
//clear the sponsor times
|
||||
let sponsorTimeKey = "sponsorTimes" + currentVideoID;
|
||||
chrome.storage.sync.set({[sponsorTimeKey]: []});
|
||||
chrome.storage.sync.set({[sponsorTimeKey]: []}, () => void updatePreviewBar());
|
||||
|
||||
//request the sponsors from the server again
|
||||
sponsorsLookup(currentVideoID);
|
||||
//add submissions to current sponsors list
|
||||
sponsorTimes = sponsorTimes.concat(sponsorTimesSubmitting);
|
||||
sponsorTimesSubmitting = [];
|
||||
} else {
|
||||
//show that the upload failed
|
||||
document.getElementById("submitButton").style.animation = "unset";
|
||||
|
|
Loading…
Reference in a new issue