aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-08-24 12:29:51 -0400
committerAjay Ramachandran <[email protected]>2019-08-24 12:29:51 -0400
commit1753f58120e9664a399d44a8bce836eecaa11f3c (patch)
tree0d6e85397cfa721891c8469d62bd240e5535140a
parent23fbbebc9e11c6cd1ad3c8242fed7afd820f72c7 (diff)
downloadSponsorBlock-1753f58120e9664a399d44a8bce836eecaa11f3c.tar.gz
SponsorBlock-1753f58120e9664a399d44a8bce836eecaa11f3c.zip
Fixed submissions being broken.
-rw-r--r--background.js40
-rw-r--r--content.js4
2 files changed, 22 insertions, 22 deletions
diff --git a/background.js b/background.js
index aa25e379..28fd6bb0 100644
--- a/background.js
+++ b/background.js
@@ -7,29 +7,29 @@ chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
chrome.runtime.onMessage.addListener(function (request, sender, callback) {
switch(request.message) {
case "submitTimes":
- submitTimes(request.videoID, callback);
-
- //this allows the callback to be called later by the submitTimes function
- return true;
+ submitTimes(request.videoID, callback);
+
+ //this allows the callback to be called later by the submitTimes function
+ return true;
case "addSponsorTime":
- addSponsorTime(request.time, request.videoID, callback);
-
- //this allows the callback to be called later
- return true;
+ addSponsorTime(request.time, request.videoID, callback);
+
+ //this allows the callback to be called later
+ return true;
case "getSponsorTimes":
- getSponsorTimes(request.videoID, function(sponsorTimes) {
- callback({
- sponsorTimes: sponsorTimes
- })
- });
-
- //this allows the callback to be called later
- return true;
+ getSponsorTimes(request.videoID, function(sponsorTimes) {
+ callback({
+ sponsorTimes: sponsorTimes
+ })
+ });
+
+ //this allows the callback to be called later
+ return true;
case "submitVote":
- submitVote(request.type, request.UUID, callback);
-
- //this allows the callback to be called later
- return true;
+ submitVote(request.type, request.UUID, callback);
+
+ //this allows the callback to be called later
+ return true;
case "alertPrevious":
chrome.notifications.create("stillThere" + Math.random(), {
type: "basic",
diff --git a/content.js b/content.js
index 2be7ce4d..708809cd 100644
--- a/content.js
+++ b/content.js
@@ -896,7 +896,7 @@ function submitSponsorTimes() {
//called after all the checks have been made that it's okay to do so
function sendSubmitMessage(){
//add loading animation
- document.getElementById("submitButtonImage").src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png");
+ document.getElementById("submitImage").src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png");
document.getElementById("submitButton").style.animation = "rotate 1s 0s infinite";
let currentVideoID = sponsorVideoID;
@@ -931,7 +931,7 @@ function sendSubmitMessage(){
} else {
//show that the upload failed
document.getElementById("submitButton").style.animation = "unset";
- document.getElementById("submitButtonImage").src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker256px.png");
+ document.getElementById("submitImage").src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker256px.png");
if([400,429,409,502].includes(response.statusCode)) {
alert(chrome.i18n.getMessage(response.statusCode));