aboutsummaryrefslogtreecommitdiffhomepage
path: root/popup.js
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-07-21 18:19:56 -0400
committerAjay Ramachandran <[email protected]>2019-07-21 18:19:56 -0400
commit2d00cfffdfac4a5e30fcef55c576ceec650de28a (patch)
treeb6cc66fcd876b69282c2b44afc7d7f3969b43042 /popup.js
parenta7a4642920e046a21a9ce101d6064b1c430fff95 (diff)
downloadSponsorBlock-2d00cfffdfac4a5e30fcef55c576ceec650de28a.tar.gz
SponsorBlock-2d00cfffdfac4a5e30fcef55c576ceec650de28a.zip
Added submit button on the video player.
Diffstat (limited to 'popup.js')
-rw-r--r--popup.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/popup.js b/popup.js
index d60bba61..3490297a 100644
--- a/popup.js
+++ b/popup.js
@@ -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
});
});
}