Skip to content

Instantly share code, notes, and snippets.

@graphicagenda
Forked from barrywoolgar/hb_all_books_dl.js
Created November 17, 2020 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graphicagenda/e187e06cc2f7f9f98a0a992c494eded8 to your computer and use it in GitHub Desktop.
Save graphicagenda/e187e06cc2f7f9f98a0a992c494eded8 to your computer and use it in GitHub Desktop.
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 will download all the books in all the formats available.
*/
$('a').each(function(i){
if (['MOBI', 'PDF', 'EPUB'].indexOf($.trim($(this).text())) >= 0) {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment