diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-30 21:08:58 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2019-07-30 21:08:58 -0400 |
commit | 9462886539694461b777d0f37dc03be1e0585644 (patch) | |
tree | 811b92fae53a0191217a1a5a615679b451823e05 | |
parent | e3aeb0caa19fa0fea6705fde96352b912ce99130 (diff) | |
parent | 85518d8130367cca69484caaed0ebddc9acf1cdb (diff) | |
download | SponsorBlock-1.0.22.tar.gz SponsorBlock-1.0.22.zip |
Merge pull request #55 from ajayyy/experimentalv1.0.22
Fixed save button being in the wrong place and made submit button hidden on editing
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | popup.js | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/manifest.json b/manifest.json index 0f427829..8c43cd9d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "SponsorBlock for YouTube - Skip Sponsorships", "short_name": "SponsorBlock", - "version": "1.0.21", + "version": "1.0.22", "description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", "content_scripts": [ { @@ -451,6 +451,9 @@ function runThePopup() { //already open return; } + + //hide submit button + document.getElementById("submitTimesContainer").style.display = "none"; let sponsorTimeContainer = document.getElementById("sponsorTimeContainer" + index); @@ -512,8 +515,7 @@ function runThePopup() { let editButton = document.getElementById("sponsorTimeEditButton" + index); let sponsorTimesContainer = document.getElementById("sponsorTimesContainer"); - editButton.remove(); - sponsorTimesContainer.appendChild(saveButton); + sponsorTimesContainer.replaceChild(saveButton, editButton); } function saveSponsorTimeEdit(index) { @@ -531,6 +533,8 @@ function runThePopup() { chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes}); displaySponsorTimes(); + + showSubmitTimesIfNecessary(); } //deletes the sponsor time submitted at an index |