Updated formatting

This commit is contained in:
Ajay Ramachandran
2019-08-13 00:32:33 -04:00
committed by GitHub
parent 44c4671977
commit c8438b9d59

View File

@@ -8,17 +8,27 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) {
switch(request.message) { switch(request.message) {
case "submitTimes": case "submitTimes":
submitTimes(request.videoID, callback); 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": case "addSponsorTime":
addSponsorTime(request.time, request.videoID, callback); 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": case "getSponsorTimes":
getSponsorTimes(request.videoID, function(sponsorTimes) { 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": case "submitVote":
submitVote(request.type, request.UUID, callback); submitVote(request.type, request.UUID, callback);
//this allows the callback to be called later
return true; return true;
case "alertPrevious": case "alertPrevious":
chrome.notifications.create("stillThere" + Math.random(), { chrome.notifications.create("stillThere" + Math.random(), {