Last active
January 28, 2020 14:33
-
-
Save corbin-c/f0509a449c3bd9a59721c42bce7f16d4 to your computer and use it in GitHub Desktop.
Bookmarklet to rebuild full PDF issues from OpenEdition Journals.
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
javascript:(() => { | |
const pdftk = "https://web-pdftk.herokuapp.com/?inputs="; | |
window.location.href = pdftk+[...document.querySelectorAll(".title a")] | |
.map(url => { | |
url = url.href.split("/"); | |
if (typeof url.find(component => component == "pdf") === "undefined") { | |
url.splice(-1,0,"pdf"); | |
} | |
url = url.join("/"); | |
url = encodeURIComponent(pdftk+url+"&operation=cat&options=2-end"); | |
return url; | |
}).join(",")+"&operation=cat"; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment