Skip to content

Instantly share code, notes, and snippets.

@szhu
Created June 29, 2022 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szhu/0dcfed50481f73211731dc43d2fe4374 to your computer and use it in GitHub Desktop.
Save szhu/0dcfed50481f73211731dc43d2fe4374 to your computer and use it in GitHub Desktop.
for (let image of document.querySelectorAll("image")) {
let url = (image.getAttribute("xlink:href"));
fetch(url).then(res => res.blob()).then(blob => open(URL.createObjectURL(blob)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment