diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-29 14:20:55 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2019-07-29 14:20:55 -0400 |
commit | a66804064adb97d4f8c2e94019efdbf6eedc2aa5 (patch) | |
tree | 227ff573183af81a5ed524deb9000f41b36826d0 | |
parent | 919f9f56bd0642b66c9c99a533c22799aeaaa6f5 (diff) | |
download | SponsorBlock-a66804064adb97d4f8c2e94019efdbf6eedc2aa5.tar.gz SponsorBlock-a66804064adb97d4f8c2e94019efdbf6eedc2aa5.zip |
Made edit button not work when end time not specified
-rw-r--r-- | popup.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |