Added submit button on the video player.

This commit is contained in:
Ajay Ramachandran
2019-07-21 18:19:56 -04:00
parent a7a4642920
commit 2d00cfffdf
6 changed files with 137 additions and 16 deletions

View File

@@ -241,14 +241,17 @@ function getSponsorTimesMessage(sponsorTimes) {
}
function clearTimes() {
//check if the player controls should be toggled
if (sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length < 2) {
//send new sponsor time state to tab
if (sponsorTimes.length > 0) {
let visibility = sponsorTimes[sponsorTimes.length - 1].length >= 2;
chrome.tabs.query({
active: true,
currentWindow: true
}, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, {
message: "toggleStartSponsorButton"
message: "changeStartSponsorButton",
visibility: visibility,
uploadButtonVisible: false
});
});
}