Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created February 10, 2021 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/bcbd3707aa233eb68d1c966ceec0b142 to your computer and use it in GitHub Desktop.
Save iaindooley/bcbd3707aa233eb68d1c966ceec0b142 to your computer and use it in GitHub Desktop.
2 items completed
function twoItemsCompleted(notification)
{
var comp = new Notification(notification).completedChecklistItem(/(First Item|Second Item)/i);
var compcount = 0;
comp.checklist().card().checklists().each(function(cl)
{
cl.items().each(function(item)
{
if(/First Item/i.test(item.name()) && item.isComplete())
{
compcount++;
}
else if(/Second Item/i.test(item.name()) && item.isComplete())
{
compcount++;
}
});
});
if(compcount == 2)
{
comp.checklist().card().postComment("MAKE YOUR TIME. ALL YOUR BASE ARE BELONG TO US.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment