diff --git a/background.js b/background.js index bf5c2136..164b2e3a 100644 --- a/background.js +++ b/background.js @@ -8,17 +8,27 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) { switch(request.message) { case "submitTimes": submitTimes(request.videoID, callback); - return true; //this allows the callback to be called later by the submitTimes function + + //this allows the callback to be called later by the submitTimes function + return true; case "addSponsorTime": addSponsorTime(request.time, request.videoID, callback); - return true; //this allows the callback to be called later + + //this allows the callback to be called later + return true; case "getSponsorTimes": getSponsorTimes(request.videoID, function(sponsorTimes) { - callback({sponsorTimes: sponsorTimes}) + callback({ + sponsorTimes: sponsorTimes + }) }); - return true; //this allows the callback to be called later + + //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; case "alertPrevious": chrome.notifications.create("stillThere" + Math.random(), {