mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 06:57:09 +03:00
Made clear times button toggle the video controls if necessary.
This commit is contained in:
13
popup.js
13
popup.js
@@ -178,6 +178,19 @@ function getSponsorTimesMessage(sponsorTimes) {
|
||||
}
|
||||
|
||||
function clearTimes() {
|
||||
//check if the player controls should be toggled
|
||||
if (sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length < 2) {
|
||||
chrome.tabs.query({
|
||||
active: true,
|
||||
currentWindow: true
|
||||
}, function(tabs) {
|
||||
chrome.tabs.sendMessage(tabs[0].id, {
|
||||
message: "toggleStartSponsorButton"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//reset sponsorTimes
|
||||
sponsorTimes = [];
|
||||
|
||||
let sponsorTimeKey = "sponsorTimes" + currentVideoID;
|
||||
|
||||
Reference in New Issue
Block a user