From 2ff70f1511cb8775a46c95859b7ea3d76c45a9e0 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 28 Jul 2019 18:32:53 -0400 Subject: [PATCH 1/4] Added missing references. --- popup.js | 4 ++++ 1 file changed, 4 insertions(+) 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); From 51a389284dc74b5e40294526601b06f0f1ec712c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 28 Jul 2019 18:48:28 -0400 Subject: [PATCH 2/4] Made video player controls state properly update when the video changes. --- content.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content.js b/content.js index 95ebe703..5c55a5b4 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"; } } }); From 7a9af6cbcf9ef52562a80a9b426da71ec823e4eb Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 28 Jul 2019 18:51:46 -0400 Subject: [PATCH 3/4] Alt-text now updates with state on player button --- content.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content.js b/content.js index 5c55a5b4..bc33e850 100644 --- a/content.js +++ b/content.js @@ -307,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"; @@ -317,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"; From 622b2ea158002441929621f3f104462bf2d56308 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 28 Jul 2019 20:51:09 -0400 Subject: [PATCH 4/4] Updated version number. --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": [ {