aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-07-29 14:20:55 -0400
committerAjay Ramachandran <[email protected]>2019-07-29 14:20:55 -0400
commita66804064adb97d4f8c2e94019efdbf6eedc2aa5 (patch)
tree227ff573183af81a5ed524deb9000f41b36826d0
parent919f9f56bd0642b66c9c99a533c22799aeaaa6f5 (diff)
downloadSponsorBlock-a66804064adb97d4f8c2e94019efdbf6eedc2aa5.tar.gz
SponsorBlock-a66804064adb97d4f8c2e94019efdbf6eedc2aa5.zip
Made edit button not work when end time not specified
-rw-r--r--popup.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/popup.js b/popup.js
index 8251113e..0b7e4bce 100644
--- a/popup.js
+++ b/popup.js
@@ -388,8 +388,12 @@ function getSponsorTimesMessageDiv(sponsorTimes) {
currentSponsorTimeContainer.innerText = currentSponsorTimeMessage;
sponsorTimesContainer.appendChild(currentSponsorTimeContainer);
sponsorTimesContainer.appendChild(deleteButton);
- sponsorTimesContainer.appendChild(spacer);
- sponsorTimesContainer.appendChild(editButton);
+
+ //only if it is a complete sponsor time
+ if (sponsorTimes[i].length > 1) {
+ sponsorTimesContainer.appendChild(spacer);
+ sponsorTimesContainer.appendChild(editButton);
+ }
}
return sponsorTimesContainer;