Created
April 30, 2020 18:39
-
-
Save alexkuc/2d4df598a5ac13fcf08047693b875255 to your computer and use it in GitHub Desktop.
Extract completed tasks from open Trello card using JavaScript and jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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