Last active
December 5, 2023 10:26
-
-
Save Pseudomanifold/b9bb873ba12687d20af0a39b3c3d6cd9 to your computer and use it in GitHub Desktop.
This is a user script (to be used with Greasemonkey, Violentmonkey, and similar packages. It automatically adds a download button for `.bib` citation export to Springer Link publications. Enjoy!
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
// ==UserScript== | |
// @name Fix bibliography links @ Springer | |
// @author Pseudomanifold | |
// @include https://link.springer.com/* | |
// @include https://*.springeropen.com/* | |
// @include https://*.nature.com/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js | |
// @version 0.0.2 | |
// ==/UserScript== | |
/* | |
Are you also as baffled by Springer's website as I am? Some publications present | |
you with a link to download citations using the .ris format only. I have *never* | |
used this format since .bib is vastly superior. Obviously. To add to my confused | |
state, some publications actually permit you to download a citation in more than | |
the .ris format. What gives? I have absolutely no clue why this is the case, and | |
of course Springer does not answer my queries. Hence, this script. It will solve | |
this issue and will add a link with the right format. Neat. | |
(╯°□°)╯︵ ┻━┻ | |
*/ | |
var BibLinks = $(".c-bibliographic-information__download-citation > a"); | |
BibLinks.each( function() {var jThis = $(this); | |
var bibLink = jThis.attr('href').replace(/format=refman/, 'format=bibtex'); | |
jThis.parent().append('<a href=' + bibLink + '>Download citation (.BIB)</a>'); | |
jThis.parent().append('<svg width="16" height="16" focusable="false" role="img" aria-hidden="true" class="u-icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-download"></use></svg>'); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment