Skip to content

Instantly share code, notes, and snippets.

@pbinkley
Last active September 15, 2023 16:35
Show Gist options
  • Save pbinkley/c30ee85d5ac4590dba3fa8c596d7d358 to your computer and use it in GitHub Desktop.
Save pbinkley/c30ee85d5ac4590dba3fa8c596d7d358 to your computer and use it in GitHub Desktop.
Bookmarklet that copies an Internet Archive IIIF manifest uri to the clipboard, if you are looking at a regular Internet Archive item.
javascript:(()=>{id=/https:\/\/archive.org\/details\/([^/]*).*/.exec(location.href);if(id){manifest="https://iiif.archive.org/iiif/"+id[1]+"/manifest.json";navigator.clipboard.writeText(manifest);alert("Copied manifest uri: "+manifest);}else{alert("This isn't an archive.org item.");}})();
javascript:(() => {
id = /https:\/\/archive.org\/details\/([^/]*).*/.exec(location.href);
if (id) {
manifest = "https://iiif.archive.org/iiif/" + id[1] + "/manifest.json";
navigator.clipboard.writeText(manifest);
alert("Copied manifest uri: " + manifest);
} else {
alert("This isn't an archive.org item.");
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment