Last active
February 25, 2024 18:56
-
-
Save aaronshaf/1346968 to your computer and use it in GitHub Desktop.
Copy text from Amazon's Cloud Reader. Helpful for students that need block quotes.
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
javascript: (function () { | |
new_window = window.open(); | |
new_window.document.body.innerHTML = $("iframe") | |
.contents() | |
.find("iframe") | |
.contents() | |
.find("body") | |
.get(1).innerHTML; | |
new_window.document.body.querySelector("#content-overlays").remove(); | |
})(); |
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
javascript:(function(){new_window=window.open();new_window.document.body.innerHTML=$("iframe").contents().find("iframe").contents().find("body").get(1).innerHTML;new_window.document.body.querySelector("#content-overlays").remove();})(); |
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
javascript: (function () { | |
document.body.innerHTML = $("iframe") | |
.contents() | |
.find("iframe") | |
.contents() | |
.find("body") | |
.get(1).innerHTML; | |
document.body.querySelector("#content-overlays").remove(); | |
document.head.querySelectorAll("link[type]").item(0).remove(); | |
Array.from(document.querySelectorAll("span.k4w")).forEach((span) => { | |
span.outerHTML = span.textContent; | |
}); | |
})(); |
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
javascript:(function () { document.body.innerHTML = $("iframe") .contents() .find("iframe") .contents() .find("body") .get(1).innerHTML; document.body.querySelector("#content-overlays").remove(); document.head.querySelectorAll('link[type]').item(0).remove(); Array.from(document.querySelectorAll('span.k4w')).forEach((span) => { span.outerHTML = span.textContent }); })(); |
Easy copy with this extension https://chrome.google.com/webstore/detail/kindle-reader-cloud-tools/mahdfgndibpomhlkckklblllfefbliem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to fetch all the highlighted/annotated text?
I found an API that
https://read.amazon.com/service/mobile/reader/getAnnotations
that can fetch all the annotations but it trims the text.There is a context field that returns the annotated/highlighted text but it trims the text. It does not show the complete text.
Is there a way to fetch the highlights/annotated in realtime?