From 51a389284dc74b5e40294526601b06f0f1ec712c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 28 Jul 2019 18:48:28 -0400 Subject: [PATCH] Made video player controls state properly update when the video changes. --- content.js | 7 +++++-- 1 file 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"; } } });