Added warning if you leave a page before submitting your sponsor times.

This commit is contained in:
Ajay Ramachandran
2019-07-09 18:59:27 -04:00
parent fcdb091d66
commit a1f645ea0e
5 changed files with 50 additions and 5 deletions

View File

@@ -35,12 +35,14 @@ function loadTabData(tabs) {
let videoTimeKey = "videoTimes" + currentVideoID;
chrome.storage.local.get([videoTimeKey], function(result) {
videoTimes = result[videoTimeKey];
if (videoTimes != undefined && result.videoTimes != []) {
if (videoTimes != undefined && videoTimes != []) {
if (videoTimes[videoTimes.length - 1]!= undefined && videoTimes[videoTimes.length - 1].length < 2) {
startTimeChosen = true;
}
displayVideoTimes();
} else {
videoTimes = []
}
});