Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book General > Deals, Freebies, and Resources (No Self-Promotion)

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2012, 04:49 AM   #1
kakapo
The Night Parrot
kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.
 
kakapo's Avatar
 
Posts: 22
Karma: 105390
Join Date: Feb 2011
Location: Codfish Island, NZ
Device: Palm Vx, Kindle Keyboard (wifi)
Bookmarklet to check if Kindle "free" books are really free

One of my favourite foraging grounds for free books for my Kindle was Amazon's Best Sellers in Kindle eBooks. That shows the top paid and free in the US books. Many books have stopped being free in the Asia-Pacific region so i wrote a bookmarklet to which ones were actually free to me. It will show the ones that are free to you by loading the pages with your login and region.

(If you've not heard of bookmarklets before, they're a bookmark that is some JavaScript code. So instead of going to a new location, they perform an action on the current page.)

I can't make a javascript: url in this forum, so it's a two step process to add it. Drag this link to your browser's bookmarks toolbar:
Kindle Best Seller price correction

Then change the url to:
Code:
javascript:amznJQ.jQuery('.zg_availability').each(function(){if(amznJQ.jQuery(this).html().trim()=='Currently%20unavailable'){amznJQ.jQuery(this).parent().parent().css('opacity',0.2);}});amznJQ.jQuery('.price').each(function(){var%20url=amznJQ.jQuery(this).parent().parent().find('a').attr('href').trim();var%20price=amznJQ.jQuery(this).html().trim();if(price=='Free'||price=='$0.00'){(function(price_node,old_price,url){amznJQ.jQuery.get(url,{},function(data,textStatus){var%20pos0=data.indexOf('class="priceLarge"');var%20pos1=data.indexOf('>',pos0);var%20pos2=data.indexOf('<',pos1);var%20new_price=data.substring(pos1+1,pos2).trim();amznJQ.jQuery(price_node).after('%20actual:'+new_price);if(new_price!='$0.00'){amznJQ.jQuery(price_node).parent().parent().parent().css('opacity',0.2);}},'text');})(this,price,url);}else{amznJQ.jQuery(this).parent().parent().parent().css('opacity',0.2);}});void(0);
Once you've done that, visit the Best Sellers in Kindle eBooks, wait for the page to finish loading and click on the new bookmark. It will check the actual price of "free" books and all the books that are not free for you will turn white.

Hopefully this is useful to someone.

If you'd like to modify the bookmarket (eg turn it into a GreaseMonkey script or Chrome extension) or just to see how it works, here is the code before i removed all the whitespace:

Code:
javascript:
amznJQ.jQuery('.zg_availability').each(function() {
  if (amznJQ.jQuery(this).html().trim() == 'Currently unavailable') {
    amznJQ.jQuery(this).parent().parent().css('opacity', 0.2);
  }
});
amznJQ.jQuery('.price').each(function() {
  var url = amznJQ.jQuery(this).parent().parent().find('a').attr('href').trim();
  var price = amznJQ.jQuery(this).html().trim();
  if (price == 'Free' || price == '$0.00') { 
    (function(price_node, old_price, url) {
      amznJQ.jQuery.get(url, {}, function (data, textStatus) {
        var pos0 = data.indexOf('class="priceLarge"');
        var pos1 = data.indexOf('>', pos0);
        var pos2 = data.indexOf('<', pos1);
        var new_price = data.substring(pos1 + 1, pos2).trim();
        amznJQ.jQuery(price_node).after(' actual:' + new_price);
        if (new_price != '$0.00') {
          amznJQ.jQuery(price_node).parent().parent().parent().css('opacity', 0.2);
        }
      }, 'text');
    })(this, price, url);
  } else {
    amznJQ.jQuery(this).parent().parent().parent().css('opacity', 0.2);
  }
});
void(0);
kakapo is offline   Reply With Quote
Old 07-11-2012, 01:49 PM   #2
CWatkinsNash
IOC Chief Archivist
CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.
 
CWatkinsNash's Avatar
 
Posts: 3,485
Karma: 32531038
Join Date: Dec 2010
Location: Nashville, TN, USA
Device: Nook STR Glowlight, Sony T1, Acer Iconia A200
YES, it is useful!!

Okay, one of the things that has been irking me about Amazon is if you sort by price, it includes "free for Prime lending" books in with the actual free books.

Your bookmarklet whites out the ones that are only free for Prime lending. Yay!

Thank you for this, and welcome to MR!
CWatkinsNash is offline   Reply With Quote
Old 07-11-2012, 03:18 PM   #3
KentE
...still a Zealot
KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.KentE ought to be getting tired of karma fortunes by now.
 
Posts: 251
Karma: 319949
Join Date: Feb 2012
Location: Kansas City, Kansas, USA
Device: Palm Pixi & PC
Very cool, Kakapo! And very kind of you to share the fruits of your labor!
I'm in the US, and have other methods of checking for free Kindle books, but I can definitely see where this is a big help for those in other countries!
Karma given, where Karma is due!
KentE
KentE is offline   Reply With Quote
Old 07-11-2012, 07:44 PM   #4
Shelli508
Junior Member
Shelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animalsShelli508 is kind to children and small, furry animals
 
Posts: 6
Karma: 6916
Join Date: Dec 2011
Device: Sony e-reader
Wow! Thanks!
Shelli508 is offline   Reply With Quote
Old 07-11-2012, 07:55 PM   #5
DuskyRose
Evangelist
DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.DuskyRose ought to be getting tired of karma fortunes by now.
 
DuskyRose's Avatar
 
Posts: 474
Karma: 1372764
Join Date: Apr 2007
Location: Virginia
Device: Sony PRS-T2, Kindle PW, Kobo Aura, Ipad Mini Retina
Very useful! Thanks!
DuskyRose is offline   Reply With Quote
Old 07-12-2012, 02:21 PM   #6
eckyecky
Junior Member
eckyecky began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2012
Device: Kindle Keyboard
Greasemonkey script It makes finding free books really easy. (Sets height of result div to 0px for non-free books.) credits to kakapo
Code:
// ==UserScript==
// @name        Amazon Free Books
// @namespace   ecky.public
// @include     http://www.amazon.com/*
// @version     1
// ==/UserScript==

function runClear() {     
  unsafeWindow.amznJQ.jQuery('.zg_availability').each(function() {
    if (unsafeWindow.amznJQ.jQuery(this).html().trim() == 'Currently unavailable') {
      unsafeWindow.amznJQ.jQuery(this).parent().parent().css('opacity', 0.2);
      unsafeWindow.amznJQ.jQuery(this).parent().parent().css('height', 0);
    }
  });
  unsafeWindow.amznJQ.jQuery('.price').each(function() {
    var url = unsafeWindow.amznJQ.jQuery(this).parent().parent().find('a').attr('href').trim();
    var price = unsafeWindow.amznJQ.jQuery(this).html().trim();
    if (price == 'Free' || price == '$0.00') { 
      (function(price_node, old_price, url) {
        unsafeWindow.amznJQ.jQuery.get(url, {}, function (data, textStatus) {
          var pos0 = data.indexOf('class="priceLarge"');
          var pos1 = data.indexOf('>', pos0);
          var pos2 = data.indexOf('<', pos1);
          var new_price = data.substring(pos1 + 1, pos2).trim();
          unsafeWindow.amznJQ.jQuery(price_node).after(' actual:' + new_price);
          if (new_price != '$0.00') {
            unsafeWindow.amznJQ.jQuery(price_node).parent().parent().parent().css('opacity', 0.2);
            unsafeWindow.amznJQ.jQuery(price_node).parent().parent().parent().css('height', 0);
          }
        }, 'text');
      })(this, price, url);
    } else {
      unsafeWindow.amznJQ.jQuery(this).parent().parent().parent().css('opacity', 0.2);
      unsafeWindow.amznJQ.jQuery(this).parent().parent().parent().css('height', 0);
      unsafeWindow.amznJQ.jQuery(this).parent().parent().parent().css('overflow', 'hidden');
    }
  });
  
}
document.addEventListener('click',function (){setTimeout(runClear,3000)},true);
runClear();
eckyecky is offline   Reply With Quote
Old 07-13-2012, 08:33 AM   #7
Sigyn
Junior Junior Member
Sigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beautySigyn does all things with Zen-like beauty
 
Sigyn's Avatar
 
Posts: 87
Karma: 32996
Join Date: Jun 2011
Device: none
Thank you very much!
Sigyn is offline   Reply With Quote
Old 07-16-2012, 07:13 PM   #8
kakapo
The Night Parrot
kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.kakapo shapes the world with his or her thoughts.
 
kakapo's Avatar
 
Posts: 22
Karma: 105390
Join Date: Feb 2011
Location: Codfish Island, NZ
Device: Palm Vx, Kindle Keyboard (wifi)
I'm glad everyone is enjoying the bookmarklet. I've written a new script for checking Kindle ebook prices directly in this forum. No more visiting a "free" link to find out it's not free for you.

Check it out at http://www.mobileread.com/forums/sho....php?p=2152684
kakapo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free books (Kindle) "Haunted" New York/Illinois/Virginia [Supernatural History] ATDrake Deals, Freebies, and Resources (No Self-Promotion) 1 12-02-2011 06:54 PM
Free books (Kindle) - 5 "Master the SAT" guides from Peterson[Study Guide] ATDrake Deals, Freebies, and Resources (No Self-Promotion) 4 01-31-2011 07:34 PM
Two Free "Books" (Kindle) - The Girl on the Beach & Mysterious Profile #24 koland Deals, Freebies, and Resources (No Self-Promotion) 17 10-13-2010 07:17 PM
Please restore the "free and inexpensive Kindle books" kindlekitten Amazon Kindle 5 11-30-2009 05:07 PM
Two free "books" on Kindle (extended samples) koland Deals, Freebies, and Resources (No Self-Promotion) 0 08-23-2009 11:17 AM


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


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