Skip to content

Instantly share code, notes, and snippets.

@jmcker
Created January 30, 2022 00:51
Show Gist options
  • Save jmcker/30c0c74062171bb42863705458c8de1c to your computer and use it in GitHub Desktop.
Save jmcker/30c0c74062171bb42863705458c8de1c to your computer and use it in GitHub Desktop.
Log Google Tasks delimited by a newline so that they can be pasted into Google Keep.
const todoClassName = 'sxojMb fbELB';
const completedClassName = 'RFmU6c';
const todo = [];
const completed = [];
for (const e of document.getElementsByClassName(todoClassName)) {
if (!e.title) continue; // Skip Details sections
todo.push(e.innerText);
}
for (const e of document.getElementsByClassName(completedClassName)) {
completed.push(e.innerText);
}
console.log('TODO:');
console.log(todo.join('\n'));
console.log('Completed:');
console.log(completed.join('\n'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment