Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book General > Deals and Resources (No Self-Promotion or Affiliate Links)

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2012, 03:49 AM   #1
kakapo
The Night Parrot
kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.
 
kakapo's Avatar
 
Posts: 23
Karma: 138516
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, 12: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,950
Karma: 53868218
Join Date: Dec 2010
Location: Fruitland Park, FL, USA
Device: Meebook M7, Paperwhite 2021, Fire HD 8+, Fire HD 10+, Lenovo Tab P12
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
Advert
Old 07-11-2012, 02: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: 268
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, 06: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, 06:55 PM   #5
DuskyRose
Guru
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: 727
Karma: 9209502
Join Date: Apr 2007
Location: Virginia
Device: Boox Air3 & Palma, Scribe & Paperwhite, Eclipsa 2e, & Libra 2, Ipads
Very useful! Thanks!
DuskyRose is offline   Reply With Quote
Advert
Old 07-12-2012, 01: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, 07: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, 06:13 PM   #8
kakapo
The Night Parrot
kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.kakapo can fool all of the people all of the time.
 
kakapo's Avatar
 
Posts: 23
Karma: 138516
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 https://www.mobileread.com/forums/sho....php?p=2152684
kakapo is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:10 AM.


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