Created
April 27, 2022 02:42
-
-
Save jrswab/16ada907f90097b186bce156d6ce5864 to your computer and use it in GitHub Desktop.
Extract notes (not highlights) from `https://read.amazon.com/notebook`
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
// Loop over every "note" in the notebook | |
// Each book is it's own notebook. | |
// Highlights are considered notes at this level. | |
for(let i = 0; i < document.getElementsByClassName("kp-notebook-note").length; i++) { | |
// An id of 5 is a placeholder for when a user adds a note. | |
// Every note and highlight has at least this many characters in the ID. | |
if (notes[i].id.length > 5) { | |
console.log(notes[i].childNodes[1].innerHTML) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment