Skip to content

Instantly share code, notes, and snippets.

View 7h3kk1d's full-sized avatar

Alexander Bandukwala 7h3kk1d

View GitHub Profile
@7h3kk1d
7h3kk1d / humble_bundle_file_downloader.js
Created February 25, 2018 00:00 — forked from tlc/humble_bundle_file_downloader.js
Download HumbleBundle book bundles easier. Puts 'curl' statements on the page for you to copy.
/* 11/27/2017 - Tweaked for a page redesign.
* 1/6/2018 - Handle videos in book bundle.
*/
var pattern = /(MOBI|EPUB|PDF( ?\(H.\))?|CBZ)$/i;
var pattern2 = /(Download)$/;
var nodes = document.getElementsByTagName('a');
var downloadCmd = '';
for (i in nodes) {
var a = nodes[i];
if (a && a.text && pattern.test(a.text.trim())) {