diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-28 18:48:28 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2019-07-28 18:48:28 -0400 |
commit | 51a389284dc74b5e40294526601b06f0f1ec712c (patch) | |
tree | f662738c082819aa76db14c404707f42d8bfbc0c | |
parent | 2ff70f1511cb8775a46c95859b7ea3d76c45a9e0 (diff) | |
download | SponsorBlock-51a389284dc74b5e40294526601b06f0f1ec712c.tar.gz SponsorBlock-51a389284dc74b5e40294526601b06f0f1ec712c.zip |
Made video player controls state properly update when the video changes.
-rw-r--r-- | content.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -146,9 +146,12 @@ function videoIDChange(id) { if (response != undefined) { let sponsorTimes = response.sponsorTimes; if (sponsorTimes != null && sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length >= 2) { - document.getElementById("submitButton").style.display = "unset"; + changeStartSponsorButton(true, true); } else if (sponsorTimes != null && sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length < 2) { - toggleStartSponsorButton(); + changeStartSponsorButton(false, true); + } else { + changeStartSponsorButton(true, true); + document.getElementById("submitButton").style.display = "none"; } } }); |