Skip to content

Instantly share code, notes, and snippets.

@A
Created September 19, 2015 22:25
Show Gist options
  • Save A/72a6aaf9e521fb93cedc to your computer and use it in GitHub Desktop.
Save A/72a6aaf9e521fb93cedc to your computer and use it in GitHub Desktop.
Just script to download all my purchases.
$('a.pdf').each(function(_,i) {
var i = $('<iframe />')
.attr('src', i.href)
.load(function () {
i.contents().find('[name="agreed"]').click();
i.contents().find('[type="submit"]').click();
})
.appendTo('body')
;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment