aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-07-26 21:47:56 -0400
committerGitHub <[email protected]>2019-07-26 21:47:56 -0400
commitd654d8934b4475e525f633ec6efc2643d3145969 (patch)
tree3b790987560fba12c35119befb943bc61d766c0a
parent64be41b008fdeeadc1d0d4331c59bd67f3e6a53d (diff)
parent97e202dbd01d11ca00aec5a03a035a472a49174a (diff)
downloadSponsorBlock-1.0.8.tar.gz
SponsorBlock-1.0.8.zip
Merge pull request #26 from ajayyy/experimentalv1.0.8
Fixed bug making player controls only submit integers
-rw-r--r--background.js8
-rw-r--r--firefox_manifest.json2
-rw-r--r--manifest.json2
3 files changed, 8 insertions, 4 deletions
diff --git a/background.js b/background.js
index f391175a..a2922d61 100644
--- a/background.js
+++ b/background.js
@@ -74,17 +74,18 @@ function addSponsorTime(time, videoID) {
//add to sponsorTimes
if (sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length < 2) {
//it is an end time
- sponsorTimes[sponsorTimes.length - 1][1] = parseInt(time);
+ sponsorTimes[sponsorTimes.length - 1][1] = time;
} else {
//it is a start time
let sponsorTimesIndex = sponsorTimes.length;
sponsorTimes[sponsorTimesIndex] = [];
- sponsorTimes[sponsorTimesIndex][0] = parseInt(time);
+ sponsorTimes[sponsorTimesIndex][0] = time;
}
//save this info
let sponsorTimeKey = "sponsorTimes" + videoID;
+ console.log(sponsorTimes)
chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes});
});
}
@@ -123,6 +124,9 @@ function submitTimes(videoID, callback) {
for (let i = 0; i < sponsorTimes.length; i++) {
getUserID(function(userIDStorage) {
//submit the sponsorTime
+ console.log(sponsorTimes)
+ console.log("/api/postVideoSponsorTimes?videoID=" + videoID + "&startTime=" + sponsorTimes[i][0] + "&endTime=" + sponsorTimes[i][1]
+ + "&userID=" + userIDStorage)
sendRequestToServer('GET', "/api/postVideoSponsorTimes?videoID=" + videoID + "&startTime=" + sponsorTimes[i][0] + "&endTime=" + sponsorTimes[i][1]
+ "&userID=" + userIDStorage, function(xmlhttp, error) {
if (xmlhttp.readyState == 4 && !error) {
diff --git a/firefox_manifest.json b/firefox_manifest.json
index e334b555..4a5fb74a 100644
--- a/firefox_manifest.json
+++ b/firefox_manifest.json
@@ -1,7 +1,7 @@
{
"name": "SponsorBlock - YouTube Sponsorship Blocker",
"short_name": "SponsorBlock",
- "version": "1.0.7",
+ "version": "1.0.8",
"description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
"content_scripts": [
{
diff --git a/manifest.json b/manifest.json
index 10ca8fa1..b55c5613 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"name": "SponsorBlock - YouTube Sponsorship Blocker",
"short_name": "SponsorBlock",
- "version": "1.0.7",
+ "version": "1.0.8",
"description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
"content_scripts": [
{