Created
September 6, 2012 17:24
-
-
Save mitjat/3658748 to your computer and use it in GitHub Desktop.
Mass-download SpringerLink articles
This file contains hidden or 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
/** | |
* For books or conference proceedings, SpringerLink makes you download | |
* one chapter/article at a time. Mass downloaders like DownThemAll help, | |
* but need link titles different than just "download" to be able to name | |
* the files sensibly. This small script sets each download link's title | |
* to the title of the article (taken from elswhere in the DOM). | |
*/ | |
function endsWith(str, suffix) { return str.indexOf(suffix, str.length - suffix.length) !== -1;} | |
$('a').filter(function(idx){return endsWith(this.href,'fulltext.pdf');}).each(function(){$(this).attr('title',$(this).parent().parent().parent().find('p.title a').text())}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment