Skip to content

Instantly share code, notes, and snippets.

@elovelan
Last active August 29, 2015 14:01
Show Gist options
  • Save elovelan/4b7b140f91185d27d88f to your computer and use it in GitHub Desktop.
Save elovelan/4b7b140f91185d27d88f to your computer and use it in GitHub Desktop.
Manilla-downloader
(function() {
/* Edit if you have a slow connection! */
var delayInSeconds = 2;
var csv = "";
function download() {
var dataRows, getNext, max, curr = 0, nextPage;
nextPage = $("a.next_page");
dataRows = $("tr.doc");
max = dataRows.length;
getNext = function() {
if (curr < max) {
row = $(dataRows[curr]);
csv += "\n" + row.data().docId + ',"' + row.find(".account")[0].innerText.trim() + '","' + row.find(".date")[0].innerText.trim() + '"';
row.find("a.download")[0].click();
curr += 1;
window.setTimeout(getNext,delayInSeconds*1000);
} else if (nextPage.length > 0) {
nextPage[0].click();
window.setTimeout(download,delayInSeconds*1000);
} else {
console.log(csv.substr(1));
}
}
getNext();
}
download();
})();
@elovelan
Copy link
Author

Navigate to your Manilla All Documents page and paste this into your browser's console. Should be cross-browser compatible but not tested. When it's done, it will output a CSV representation of the account and date of each document to the console.

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