Updated formatting

This commit is contained in:
Ajay Ramachandran 2019-08-13 00:32:33 -04:00 committed by GitHub
parent 44c4671977
commit c8438b9d59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(), {