Skip to content

Instantly share code, notes, and snippets.

@corbin-c
Last active January 28, 2020 14:33
Show Gist options
  • Save corbin-c/f0509a449c3bd9a59721c42bce7f16d4 to your computer and use it in GitHub Desktop.
Save corbin-c/f0509a449c3bd9a59721c42bce7f16d4 to your computer and use it in GitHub Desktop.
Bookmarklet to rebuild full PDF issues from OpenEdition Journals.
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