aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-07-28 20:53:38 -0400
committerGitHub <[email protected]>2019-07-28 20:53:38 -0400
commitacb3c6762900911cdeb12d478f34350f51b7ee77 (patch)
treef0de8100be2f54027c38f0dd7b1a16956ce04b48
parentff9badf2e9bd246c7be87c980926d121b9446752 (diff)
parent622b2ea158002441929621f3f104462bf2d56308 (diff)
downloadSponsorBlock-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.js9
-rw-r--r--manifest.json2
-rw-r--r--popup.js4
3 files changed, 12 insertions, 3 deletions
diff --git a/content.js b/content.js
index 95ebe703..bc33e850 100644
--- a/content.js
+++ b/content.js
@@ -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": [
{
diff --git a/popup.js b/popup.js
index 4526bfbe..7a8711df 100644
--- a/popup.js
+++ b/popup.js
@@ -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);