Skip to content

Instantly share code, notes, and snippets.

@nathan-appere
Forked from niallsmart/copy-checklist.js
Last active May 8, 2020 07:18
Show Gist options
  • Save nathan-appere/db597f36db53303beb3cbeb4a7ece53b to your computer and use it in GitHub Desktop.
Save nathan-appere/db597f36db53303beb3cbeb4a7ece53b to your computer and use it in GitHub Desktop.
Copy Trello checklist to clipboard
copy($(".checklist-item:not(.checklist-item-checked)").map(function() {
var $el = $(this),
item = $el.find(".checklist-item-details-text").text();
if ($el.hasClass("checklist-item-state-complete")) {
item = "- [x] " + item;
} else {
item = "- [ ] " + item;
}
return item;
}).get().join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment