mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Improved confirm message.
This commit is contained in:
@@ -394,6 +394,6 @@
|
|||||||
"message": "Sponsor segments shorter than the set value will not be skipeed or show in the player."
|
"message": "Sponsor segments shorter than the set value will not be skipeed or show in the player."
|
||||||
},
|
},
|
||||||
"shortCheck": {
|
"shortCheck": {
|
||||||
"message": "One of the segments is shorter than your minimum duration. Do you still want to submit?"
|
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1022,11 +1022,14 @@ function submitSponsorTimes() {
|
|||||||
//update sponsorTimesSubmitting
|
//update sponsorTimesSubmitting
|
||||||
sponsorTimesSubmitting = sponsorTimes;
|
sponsorTimesSubmitting = sponsorTimes;
|
||||||
|
|
||||||
|
// Check to see if any of the submissions are below the minimum duration set
|
||||||
|
if (Config.config.minDuration > 0) {
|
||||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||||
if (sponsorTimes[i][1] - sponsorTimes[i][0] < Config.config.minDuration) {
|
if (sponsorTimes[i][1] - sponsorTimes[i][0] < Config.config.minDuration) {
|
||||||
let confirmShort = chrome.i18n.getMessage("shortCheck") + "\n\n" + getSponsorTimesMessage(sponsorTimes);
|
let confirmShort = chrome.i18n.getMessage("shortCheck") + "\n\n" + getSponsorTimesMessage(sponsorTimes);
|
||||||
|
|
||||||
if(!confirm(confirmShort)) return;
|
if(!confirm(confirmShort)) return;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user