Skip to content

Instantly share code, notes, and snippets.

@spig
Last active December 28, 2016 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spig/7ec28b8ff1312c85d68e03f0168ffdb4 to your computer and use it in GitHub Desktop.
Save spig/7ec28b8ff1312c85d68e03f0168ffdb4 to your computer and use it in GitHub Desktop.
delete a kindle book's annotations
// 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