This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Forked from https://gist.github.com/p0kR/95e05e689be4e59b1b8fb6e383b9e25a | |
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 | |
Settings (chrome://settings) --> Advanced --> Privacy and security --> Content settings --> PDF documents --> Download PDF files instead of automatically opening them in Chrome --> Turn ON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayToCSV (twoDiArray) { | |
// Modified from: http://stackoverflow.com/questions/17836273/ | |
// export-javascript-data-to-csv-file-without-server-interaction | |
var csvRows = []; | |
for (var i = 0; i < twoDiArray.length; ++i) { | |
for (var j = 0; j < twoDiArray[i].length; ++j) { | |
twoDiArray[i][j] = '\"' + twoDiArray[i][j] + '\"'; // Handle elements that contain commas | |
} | |
csvRows.push(twoDiArray[i].join(',')); | |
} |