Made the notice stay open after an unskip and allow to reskip.

The time remaining of the popup becomes the time remaining of the sponsor.
This commit is contained in:
Ajay Ramachandran
2019-08-19 19:07:14 -04:00
parent 50f929c11a
commit 19802a7a31
3 changed files with 63 additions and 8 deletions

View File

@@ -515,12 +515,17 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
}
}
function goBackToPreviousTime(sponsorTime) {
function unskipSponsorTime(UUID) {
if (sponsorTimes != null) {
//add a tiny bit of time to make sure it is not skipped again
v.currentTime = sponsorTimes[UUIDs.indexOf(sponsorTime.UUID)][0] + 0.001;
v.currentTime = sponsorTimes[UUIDs.indexOf(UUID)][0] + 0.001;
}
}
sponsorTime.closeSkipNotice();
function reskipSponsorTime(UUID) {
if (sponsorTimes != null) {
//add a tiny bit of time to make sure it is not skipped again
v.currentTime = sponsorTimes[UUIDs.indexOf(UUID)][1];
}
}