mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-14 15:37:12 +03:00
Updated formatting
This commit is contained in:
committed by
GitHub
parent
44c4671977
commit
c8438b9d59
@@ -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(), {
|
||||||
|
|||||||
Reference in New Issue
Block a user