Skip to content

Instantly share code, notes, and snippets.

@alexkuc
Created April 30, 2020 18:39
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 alexkuc/2d4df598a5ac13fcf08047693b875255 to your computer and use it in GitHub Desktop.
Save alexkuc/2d4df598a5ac13fcf08047693b875255 to your computer and use it in GitHub Desktop.
Extract completed tasks from open Trello card using JavaScript and jQuery
const tasks = () => {
let tasks = ``;
// eslint-disable-next-line
$.each( $('.checklist-item-state-complete'), (i, val) => { // jQuery is already loaded by Trello
const task = $(val).find('.js-checkitem-name').text(); // eslint-disable-line
tasks = `${tasks}\n${task}`;
});
tasks = `${tasks}\n`;
return tasks;
};
// pro tip: use with Chrome plugin like GreaseMonkey or Tampermonkey to avoid manually re-typing function on website reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment