aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-07-28 18:48:28 -0400
committerAjay Ramachandran <[email protected]>2019-07-28 18:48:28 -0400
commit51a389284dc74b5e40294526601b06f0f1ec712c (patch)
treef662738c082819aa76db14c404707f42d8bfbc0c
parent2ff70f1511cb8775a46c95859b7ea3d76c45a9e0 (diff)
downloadSponsorBlock-51a389284dc74b5e40294526601b06f0f1ec712c.tar.gz
SponsorBlock-51a389284dc74b5e40294526601b06f0f1ec712c.zip
Made video player controls state properly update when the video changes.
-rw-r--r--content.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/content.js b/content.js
index 95ebe703..5c55a5b4 100644
--- a/content.js
+++ b/content.js
@@ -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";
}
}
});