Created
November 5, 2014 03:41
-
-
Save maojj/9703d1aff09c2420679c to your computer and use it in GitHub Desktop.
Delete multi personal documents on Amazon for Kindle
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
// This is used to delete mulity personal documents for Amazon kindle. | |
// | |
// Thanks for xcv58 (http://www.amazon.com/gp/pdp/profile/A22UYYGCF3VPLE) | |
// http://www.amazon.com/forum/kindle/ref=cm_cd_pg_oldest?_encoding=UTF8&authToken=&cdForum=Fx1D7SY3BVSESG&cdPage=1&cdSort=newest&cdThread=Tx1NTIGX6GSG007 | |
// | |
// 1.Make a bookmarklet, fill the url filed with the bottom javescript code. | |
// 2.In personal documents page, click the bookmarklet, and there will be a checkbox in front of every item. | |
// 3.Select the box if you want delete the item, and there are three links can select ALL, NONE and REVERSE. | |
// 4.Click the bookmarklet again, the selected items will be deleted perfectly! | |
// | |
// Here you are: | |
javascript:(function(){ var v = new RegExp('PersonalDocuments'); if (!v.test(document.URL)) {alert("The script can only work in Personal Documents!");}else{a=document.getElementsByClassName('rowBodyCollapsed');b=document.getElementsByName('checkboxForDelete');if(b.length==0){document.getElementById('Row1Button').innerHTML += "<a href='javascript:(function(){for(var i=0;i<b.length;i++){b[i].checked=true;};})();'>All</a><a href='javascript:(function(){for(var i=0;i<b.length;i++){b[i].checked=false;};})();'> None</a><a href='javascript:(function(){for(var i=0;i<b.length;i++){b[i].checked=!b[i].checked;};})();'> Reverse</a>";for(var i = 0; i<a.length; i++){ tmp=document.getElementById('Row' + (i+1) + 'Button'); tmp.innerHTML += "<input type='checkbox' name='checkboxForDelete' >";};}else{for(var i = 0; i<b.length; i++){if(b[i].checked){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));}};}return;}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment