Made editing not possible on unfinished sponsors.

Resolved https://github.com/ajayyy/SponsorBlock/issues/77
This commit is contained in:
Ajay Ramachandran
2019-08-12 11:42:39 -04:00
parent 29a8608f9d
commit 5adeeed634

View File

@@ -492,7 +492,6 @@ function runThePopup() {
}
currentSponsorTimeContainer.innerText = currentSponsorTimeMessage;
currentSponsorTimeContainer.addEventListener("click", () => editSponsorTime(index));
sponsorTimesContainer.appendChild(currentSponsorTimeContainer);
sponsorTimesContainer.appendChild(deleteButton);
@@ -500,6 +499,8 @@ function runThePopup() {
//only if it is a complete sponsor time
if (sponsorTimes[i].length > 1) {
sponsorTimesContainer.appendChild(editButton);
currentSponsorTimeContainer.addEventListener("click", () => editSponsorTime(index));
}
}