mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Made editing not possible on unfinished sponsors.
Resolved https://github.com/ajayyy/SponsorBlock/issues/77
This commit is contained in:
3
popup.js
3
popup.js
@@ -492,7 +492,6 @@ function runThePopup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
currentSponsorTimeContainer.innerText = currentSponsorTimeMessage;
|
currentSponsorTimeContainer.innerText = currentSponsorTimeMessage;
|
||||||
currentSponsorTimeContainer.addEventListener("click", () => editSponsorTime(index));
|
|
||||||
|
|
||||||
sponsorTimesContainer.appendChild(currentSponsorTimeContainer);
|
sponsorTimesContainer.appendChild(currentSponsorTimeContainer);
|
||||||
sponsorTimesContainer.appendChild(deleteButton);
|
sponsorTimesContainer.appendChild(deleteButton);
|
||||||
@@ -500,6 +499,8 @@ function runThePopup() {
|
|||||||
//only if it is a complete sponsor time
|
//only if it is a complete sponsor time
|
||||||
if (sponsorTimes[i].length > 1) {
|
if (sponsorTimes[i].length > 1) {
|
||||||
sponsorTimesContainer.appendChild(editButton);
|
sponsorTimesContainer.appendChild(editButton);
|
||||||
|
|
||||||
|
currentSponsorTimeContainer.addEventListener("click", () => editSponsorTime(index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user