Skip to content

Instantly share code, notes, and snippets.

Forked from kfatehi/hb_all_books_dl.js
Last active January 17, 2020 12:22
  • Star 13 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Humble bundle book bundles - download all books at once
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
type “about:plugins” in the address bar and disable chrome's pdf viewer
var pattern = /(ZIP|MOBI|EPUB.*|PDF|PDF( ?\(H.\))?|CBZ|PRC|Download|Supplement)$/i;
var nodes = document.getElementsByTagName('a');
for (i in nodes) {
var a = nodes[i];
if (a && a.text && pattern.test(a.text.trim())) {
download(a.attributes['href'].value, i);
function download(url, i) {
var iframe = document.createElement('iframe'); = "dl_iframe_" + i; = "none";
iframe.src = url;
console.log('iframe set to', url)
Copy link

So useful. Humble Bundle book interface is awful.

Thanks for saving me some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment