Last active
December 28, 2016 20:20
-
-
Save spig/7ec28b8ff1312c85d68e03f0168ffdb4 to your computer and use it in GitHub Desktop.
delete a kindle book's annotations
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
// run on https://kindle.amazon.com/your_highlights | |
// find asin in the form for a delete on the book you want to remove highlights for | |
var asin = "B00BNGXNW2"; | |
$('form > input[value="'+asin+'"]').each(function(index, input) { | |
var form = input.closest('form'); | |
var action = $(form).attr('action'); | |
var auth = $(form).find("input[name=authenticity_token]").attr('value'); | |
//var asin = $(form).find("input[name=asin]").attr('value'); | |
var annid = $(form).find("input[name=annotation_id]").attr('value'); | |
$.post( | |
action, | |
{ authenticity_token: auth, asin: asin, annotation_id: annid, delete: "" }, | |
function() { | |
console.log("deletion complete"); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment