Created
January 30, 2022 00:51
-
-
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.
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 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