Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2013, 02:42 AM   #31
xendula
eBookworm
xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.xendula ought to be getting tired of karma fortunes by now.
 
xendula's Avatar
 
Posts: 2,300
Karma: 4525746
Join Date: Aug 2005
Location: East Coast *brrrrr*
Device: Kindle 4B/K ~ Nexus 7 ~ Kindle Paperwhite 1&2 ~ iPad Air
Quote:
Originally Posted by l_macd View Post
That's exactly how I found it to work. I ended up restoring the books from my trashcan in the media library so I could properly delete them in MYK..... unfortunately I lost the will to continue deleting them individually after about 30 books and approximately 15 minutes waiting for the MYK to refresh each time.

I am so tempted to try those mass delete bookmarklets, but I'm full agreement with jswinden's post about using 3rd party scripts on my account.
Ditto. I have over 300 books that I need to get rid of.

Interesting comments above. When I deleted books through MYK, I still found them in the trashcan or through search in the media library.
xendula is offline   Reply With Quote
Old 12-30-2013, 04:37 PM   #32
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Again, you can always look at the bookmarklet then host it in your own cloud storage.
eschwartz is offline   Reply With Quote
Advert
Old 12-30-2013, 05:00 PM   #33
soulfuldog
I ♥ Calibre
soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.
 
soulfuldog's Avatar
 
Posts: 2,073
Karma: 5678911
Join Date: Aug 2011
Location: UK
Device: Kindle Oasis, Voyage, Sony PRS-350, Hudl2
Quote:
Originally Posted by eschwartz View Post
Again, you can always look at the bookmarklet then host it in your own cloud storage.
Can you expand on that?
soulfuldog is offline   Reply With Quote
Old 12-31-2013, 12:32 PM   #34
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by l_macd View Post
Can you expand on that?
The bookmarklet is this:
Quote:
javascript: (function(){ a=document.getElementById('mdki_container'); if(a!=null){a.className='show'} else{ url='https://j4n-co.github.com/mass-destroy-kindle-items/mdki/mdki'; mdki_js=document.createElement('SCRIPT'); mdki_js.type='text/javascript'; mdki_js.src=url+'.js'; mdki_css=document.createElement('LINK'); mdki_css.type='text/css'; mdki_css.rel='stylesheet'; mdki_css.media='screen'; mdki_css.href=url+'.css'; document.getElementsByTagName('head')[0].appendChild(mdki_css); document.getElementsByTagName('head')[0].appendChild(mdki_js); }; }) ();
As you can see, the (new) location of the script is: https://j4n-co.github.com/mass-destr...s/mdki/mdki.js with some css at: https://j4n-co.github.com/mass-destr.../mdki/mdki.css. It is a simple matter to look at the code and see it's not doing anything sinister. You can also use the homepage button to view the GitHub project (and fork it, if you wish). It is hosted by a fairly reputable group, and all the code is easily viewed, and if you really want as an added precaution you can host the actual javascript yourself, so no third parties are involved, they can't change it on you (if you control the source) and it's all as safe as can be. Just save the linked js and css files in your choice of home web server, cloud storage, personal website, or whatever, then edit the bookmarklet to show the new source. It is by design simple to do so: simply redefine
Quote:
url='https://j4n-co.github.com/mass-destroy-kindle-items/mdki/mdki'
as the new location, where %url%.js and %url%.css are the linked resources.

It is actually explained on the home page:
Quote:
The Code

The bookmarklet injects the following javascript onto the page. It creates a DOM element with a text input, sets a keyup event on the input, finds the ID's of items that matches the text input, then calls the function amazon uses to delete items, Fion.deleteItem.


Code:
  function mdki(){
  
  var div;
  var input;
  var button;
  var v; 
  var a = document.getElementsByClassName('rowBodyCollapsed');
  var b = document.getElementsByClassName('headerTitle');
  var c = [];
  var count = 0; 

  function make_mdki_dom(){
    div = document.createElement('div');
    div.id='mdki_container';
    h1 = document.createElement('h1');
    h1.innerHTML='Mass Delete Kindle Items';
    hr=document.createElement('hr');
    label=document.createElement('label');
    label.for='mdki_input';
    label.innerHTML='enter the title of the items you wish to delete';
    
    input=document.createElement('input');
    input.type='text';
    input.name='mdki_input';
    input.id='mdki_input';
    input.value='';
    input.addEventListener('keyup', mdki_keyup);
    
    button=document.createElement('button');
    button.id='mdki_button';
    button.innerHTML='delete these items';
    button.addEventListener('click',mdki_click)
      
    close_div=document.createElement('div');
    close_div.id="close_div";
    close_div.innerHTML= '✖';   
    close_div.addEventListener('click', close);
    
    div.appendChild(h1);
    div.appendChild(hr);
    div.appendChild(label);
    div.appendChild(input);
    div.appendChild(button);
    div.appendChild(close_div);
    document.body.appendChild(div);
  } 
  
  function mdki_click(event){
    button=event.target
    v=input.value;
    button.setAttribute('disabled','disabled'); 
    delete_items();
  }
  
  function mdki_keyup(event){
    v=input.value;
    for(var i = 0; i<b.length; i++) {
      b[i].className = b[i].className.replace(/mdki_highlight/g,'');        
      if (b[i].textContent.match(v)){
        b[i].className += " mdki_highlight";  
      }
    }
  }

  function close(event){
    div.className = '';
    input.value = '';
    for(var i = 0; i<b.length; i++) {  
      b[i].className = b[i].className.replace(/mdki_highlight/g,'');        
    }
  }

  make_mdki_dom();
  input.focus();
  div.className = 'show';
  
  function delete_items(){
    if (a.length == b.length){
      for(var i = 0; i<b.length; i++) {
        if (b[i].textContent.match(v)) {
          c.push([i]);
          count +=1;
        }
      };
      
      if (count == 0){
        alert("There are no items with the title '"+v+"' on this page")
        button.removeAttribute('disabled');
        v.value = "";  
      } else {
      
        var conf = confirm(count+" items with the title:'"+v+"' will be deleted");      
        
        if (conf){
          for (i in c){
            Fion.deleteItem('deleteItem_'+a[c[i]].getAttribute('asin'));        
          }
        }
        else {
          c = [];
          count = 0; 
          button.removeAttribute('disabled');
          return false;  
        }
      }
    }
  }
}
mdki();

Last edited by eschwartz; 12-31-2013 at 12:36 PM.
eschwartz is offline   Reply With Quote
Old 12-31-2013, 02:56 PM   #35
soulfuldog
I ♥ Calibre
soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.
 
soulfuldog's Avatar
 
Posts: 2,073
Karma: 5678911
Join Date: Aug 2011
Location: UK
Device: Kindle Oasis, Voyage, Sony PRS-350, Hudl2
Many thanks eschwartz, followed your instructions to host the script myself, and now know that MDKI isn't really for me.... I'll need to see if I can get the files for Check and Delete and see if I can do the same with it instead.
soulfuldog is offline   Reply With Quote
Advert
Old 12-31-2013, 03:14 PM   #36
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by l_macd View Post
I'll need to see if I can get the files for Check and Delete and see if I can do the same with it instead.
Here is the bookmarklet:
Code:
javascript:(function(){var%20isBulkDeleteLoaded%20=%20false;%20if%20(!isBulkDeleteLoaded)%20{%20js%20=%20document.createElement('SCRIPT');%20js.type%20=%20'text/javascript';%20js.src%20=%20'//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';%20document.getElementsByTagName('head')[0].appendChild(js);%20js%20=%20document.createElement('SCRIPT');%20js.type%20=%20'text/javascript';%20js.src%20=%20'//myk-check-and-delete.googlecode.com/files/myk-check-delete.js';%20document.getElementsByTagName('head')[0].appendChild(js);%20isBulkDeleteLoaded%20=%20true;%20}})();
In readable form (as per the home page):

Quote:
Quote:
var isBulkDeleteLoaded = false;
if (!isBulkDeleteLoaded) {
js = document.createElement('SCRIPT');
js.type = 'text/javascript';
js.src = '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';
document.getElementsByTagName('head')[0].appendChild(js);

js = document.createElement('SCRIPT');
js.type = 'text/javascript';
js.src = '//myk-check-and-delete.googlecode.com/files/myk-check-delete.js';
document.getElementsByTagName('head')[0].appendChild(js);

isBulkDeleteLoaded = true;
}
The bookmarklet loads jQuery from Google CDN plus a short script that adds the checkboxes and the button.
Here's the content of this script (up-to-date content fetched dynamically):
Quote:
$(document).ready(function() {
$('.firstCol').css('width', 'auto');
$('.rowBodyCollapsed').each(function(i){
$('#Row'+(i+1)+'Button')
.css('white-space', 'nowrap')
.prepend('<input type="checkbox" name="asin" value="'+$(this).attr('asin')+'">');
});

$('#pagination').prepend('<input type="button" id="bulkDelete" value="Bulk Delete">');
$('#bulkDelete').click(function() {
$('input[name=asin]:checked').each(function() {
// alert($(this).val());
Fion.deleteItem('deleteItem_'+$(this).val());
});
});

});
eschwartz is offline   Reply With Quote
Old 01-01-2014, 07:04 AM   #37
soulfuldog
I ♥ Calibre
soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.soulfuldog ought to be getting tired of karma fortunes by now.
 
soulfuldog's Avatar
 
Posts: 2,073
Karma: 5678911
Join Date: Aug 2011
Location: UK
Device: Kindle Oasis, Voyage, Sony PRS-350, Hudl2
Thanks eschwartz (and also to Petr for responding to my email), although I can't get the Check and Delete one to work, instead of there being check boxes next to my books, I end up with just an empty white space where the books should be listed under the 'Your Kindle Library' heading. Thanks anyway!
soulfuldog is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Books deleted from Kindle library still show in Kindle for Android app jstabe Android Devices 0 11-17-2013 05:27 PM
PRS-300 - Can books be deleted? GA Russell Sony Reader 6 09-26-2013 10:08 AM
How I deleted books from Kindle Archives BAM Amazon Kindle 1 08-09-2012 07:01 PM
trying to organize kindle, books keep being deleted from collections. fraustykindle Amazon Kindle 2 01-29-2011 08:33 PM
Deleted blog but still shows up grayed out-is this normal? Mulder Amazon Kindle 1 01-30-2010 10:28 AM


All times are GMT -4. The time now is 11:53 AM.


MobileRead.com is a privately owned, operated and funded community.