From a66804064adb97d4f8c2e94019efdbf6eedc2aa5 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 29 Jul 2019 14:20:55 -0400 Subject: [PATCH] Made edit button not work when end time not specified --- popup.js | 8 ++++++-- 1 file 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;