Skip to content

Instantly share code, notes, and snippets.

@saber13812002
Forked from niallsmart/copy-checklist.js
Created October 2, 2020 08:15
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 saber13812002/2ea17924f947b2008715209c89be6874 to your computer and use it in GitHub Desktop.
Save saber13812002/2ea17924f947b2008715209c89be6874 to your computer and use it in GitHub Desktop.
Copy Trello checklist to clipboard
copy($(".checklist-item:not(.checklist-item-checked)").map(function() {
var e = $(this),
item = e.find(".checklist-item-details-text").text()
if (e.hasClass("checklist-item-state-complete")) {
item = item + " (DONE)"
}
return item
}).get().join("\n"))
@saber13812002
Copy link
Author

https://gist.github.com/niallsmart/d7138b87b306a1f3bb8a

$(".checklist-item").map(function(i, item) {
let text = $(item).find(".checklist-item-details-text").text();
if( $(item).hasClass("checklist-item-state-complete") ) {
text += " (DONE)";
}
return text;
}).get().join('\n')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment