在 Amazon Kindle Library (<a id="linkPersonalDocuments" href="https://www.amazon.com/gp/digital/fiona/manage?ie=UTF8&*Version*=1&*entries*=0#PersonalDocuments">Personal Documents</a>) 里批量删除文档比较麻烦:由于 Amazon 没有提供此服务,以往必须一个个手工删除,当我们频繁使用 amazon 的邮件服务 convert 文档,并从云端传输到 kindle 后会留下很多垃圾记录,下图页面中可见;时间久了就发现删除很麻烦,如果重新绑定 ID,则又经常会从云端自动下载到 Kindle fire 等设备上;使用下面代码就可以在图中每个文档前产生一个复选框,可以选择性批量删除,非常方便;使用方法:将下面一段代码复制后创建一个新的书签,在 Personal Document 页面上时点击该书签菜单按钮即可完成!
javascript:(function()%7B%20var%20v%20=%20new%20RegExp('PersonalDocuments');%20if%20(!v.test(document.URL))%20%7Balert(%22The%20script%20can%20only%20work%20in%20Personal%20Documents!%22);%7Delse%7Ba=document.getElementsByClassName('rowBodyCollapsed');b=document.getElementsByName('checkboxForDelete');if(b.length==0)%7Bdocument.getElementById('Row1Button').innerHTML%20+=%20%22%3Ca%20href='javascript:(function()%7Bfor(var%20i=0;i%3Cb.length;i++)%7Bb%5Bi%5D.checked=true;%7D;%7D)();'%3EAll%3C/a%3E%3Ca%20href='javascript:(function()%7Bfor(var%20i=0;i%3Cb.length;i++)%7Bb%5Bi%5D.checked=false;%7D;%7D)();'%3E%20None%3C/a%3E%3Ca%20href='javascript:(function()%7Bfor(var%20i=0;i%3Cb.length;i++)%7Bb%5Bi%5D.checked=!b%5Bi%5D.checked;%7D;%7D)();'%3E%20Reverse%3C/a%3E%22;for(var%20i%20=%200;%20i%3Ca.length;%20i++)%7B%20tmp=document.getElementById('Row'%20+%20(i+1)%20+%20'Button');%20tmp.innerHTML%20+=%20%22%3Cinput%20type='checkbox'%20name='checkboxForDelete'%20/%3E%22;%7D;%7Delse%7Bfor(var%20i%20=%200;%20i%3Cb.length;%20i++)%7Bif(b%5Bi%5D.checked)%7BFion.deleteItem('deleteItem_'+a%5Bi%5D.getAttribute('asin'));%7D%7D;%7Dreturn;%7D%7D)();
正文完