diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-28 20:53:38 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2019-07-28 20:53:38 -0400 |
commit | acb3c6762900911cdeb12d478f34350f51b7ee77 (patch) | |
tree | f0de8100be2f54027c38f0dd7b1a16956ce04b48 | |
parent | ff9badf2e9bd246c7be87c980926d121b9446752 (diff) | |
parent | 622b2ea158002441929621f3f104462bf2d56308 (diff) | |
download | SponsorBlock-acb3c6762900911cdeb12d478f34350f51b7ee77.tar.gz SponsorBlock-acb3c6762900911cdeb12d478f34350f51b7ee77.zip |
Merge pull request #43 from ajayyy/experimentalv1.0.13
Updates to the video player controls
-rw-r--r-- | content.js | 9 | ||||
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | popup.js | 4 |
3 files changed, 12 insertions, 3 deletions
@@ -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"; } } }); @@ -304,6 +307,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { if (showStartSponsor) { showingStartSponsor = true; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png"); + document.getElementById("startSponsorButton").setAttribute("title", "Sponsor Starts Now"); if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible) { document.getElementById("submitButton").style.display = "unset"; @@ -314,6 +318,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { } else { showingStartSponsor = false; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker256px.png"); + document.getElementById("startSponsorButton").setAttribute("title", "Sponsor Ends Now"); //disable submit button document.getElementById("submitButton").style.display = "none"; diff --git a/manifest.json b/manifest.json index 2287e4d3..e1c82d75 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "SponsorBlock - YouTube Sponsorship Blocker", "short_name": "SponsorBlock", - "version": "1.0.12", + "version": "1.0.13", "description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", "content_scripts": [ { @@ -16,6 +16,10 @@ SB.reportAnIssue = document.getElementById("reportAnIssue"); SB.sponsorTimesContributionsContainer = document.getElementById("sponsorTimesContributionsContainer"); SB.sponsorTimesContributionsDisplay = document.getElementById("sponsorTimesContributionsDisplay"); SB.sponsorTimesContributionsDisplayEndWord = document.getElementById("sponsorTimesContributionsDisplayEndWord"); +// sponsorTimesViewsDisplay +SB.sponsorTimesViewsContainer = document.getElementById("sponsorTimesViewsDisplayContainer"); +SB.sponsorTimesViewsDisplay = document.getElementById("sponsorTimesViewsDisplayDisplay"); +SB.sponsorTimesViewsDisplayEndWord = document.getElementById("sponsorTimesViewsDisplayDisplayEndWord"); //setup click listeners SB.sponsorStart.addEventListener("click", sendSponsorStartMessage); |