mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 21:17:20 +03:00
Added submit button on the video player.
This commit is contained in:
9
popup.js
9
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
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user