View Single Post
Old 12-28-2011, 05:45 PM   #1
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,669
Karma: 2300001
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Bookmarklet to batch delete archived personal documents

For the new bookmarklet for deleting content items see bstriddy's post




Original post:
Spoiler:

when I tried to delete personal documents from the archive I realized that it is too boring to delete them one by one. Then with the help of Aei, created a bookmarklet to delete them page by page.

It could be possible to improve it by adding some filter for publisher, date, etc for specific usages.
Also you can use search filter on the page before using this bookmarklet.

To be safe it only works on "Personal Documents" section

just create a bookmark using this code as url; and press whenever you want to delete displayed personal documents. It will delete them (only displayed ones) immediately.

Code:
javascript:(function(){ var v = new RegExp("PersonalDocuments"); if (!v.test(document.URL)) { return false; } {a=document.getElementsByClassName('rowBodyCollapsed');for(var i = 0; i<a.length; i++){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));};return; }})();
This trick is useful also to get rid of huge list( of newpapers and such) on Pending Deliveries since if you delete a pending delivery on your Personal Documents list it will be deleted from the Pending Deliveries list also .

You can use the filter on Personal Documents to choose a title, author,date before using this bookmarklet.

[Image violates Posting Guidelines for size - MODERATOR]

--------------------------

>>> How to create a bookmarklet:
How to Install Bookmarklets on iPhone and iPad:
Spoiler:

How create Bookmarklet on Chrome and Firefox:
Spoiler:
  • Copy the code above
  • right click on your bookmark bar
  • use the "add page" option
  • paste the code as url
  • give it a name
  • click to "OK" ( or "Save" , etc)
  • done
  • click on this bookmark whenever you need
--------------------------

>>> How to use it :
Click image for larger version

Name:	Bookmarklet.png
Views:	2285
Size:	114.7 KB
ID:	86996
Click to the bookmark after applying the step 1 and (optional) step 2 as seen on this image.

--------------------------

>>> Using on Safari:
Quote:
Originally Posted by johnnyb View Post
Hey, it does actually work in Safari with JavaScript debugging on...
Via Developer toolbar...
--------------------------

>>> You can use this script for other parts of your archived documents as such:

Quote:
Originally Posted by montalex View Post
Thanks much for this! I just replaced "Personal Documents" in the script with "Newspapers" (as below) and removed all of my archived newspapers.

Code:
javascript:(function(){ var v = new RegExp("Newspapers"); if (!v.test(document.URL)) { return false; } {a=document.getElementsByClassName('rowBodyCollapsed');for(var i = 0; i<a.length; i++){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));};return; }})();
--------------------------

>>> Some related stuff

This and this page may help if you interested in tweaking the bookmarklet

Last edited by Dr. Drib; 07-17-2016 at 12:17 PM.
thomass is offline   Reply With Quote