Created
September 30, 2013 06:49
-
-
Save gurdiga/6760137 to your computer and use it in GitHub Desktop.
Personalized Web Options for Kindle Library to delete an item with a double click.
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script> | |
var q = jQuery.noConflict(true); | |
q(function($) { | |
$('table#orderList').on('dblclick', 'tr[id~="collapse"]', function() { | |
var $tr = $(this), | |
sessionId = document.cookie.split(';') | |
.map(function(item) { return item.split('=', 2).map(function(token) { return token.toString().trim(); }); }) | |
.filter(function(pair) { return pair[0] == 'session-id'; })[0][1]; | |
var data = { | |
contentName: $tr.find('input[name="contentName"]').val(), | |
loanId: '', | |
sid: sessionId, | |
isAjax: 1, | |
category: 'kindle_pdoc', | |
orderID: 'undefined' | |
}; | |
$tr.find('td').css({color: 'red'}); | |
$.post('/gp/digital/fiona/du/fiona-delete.html', data, function() { | |
$tr.remove(); | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment