Skip to content

Instantly share code, notes, and snippets.

@cecil
Created May 4, 2021 07:22
Show Gist options
  • Save cecil/1931df62e668262b42b2cfd653655e77 to your computer and use it in GitHub Desktop.
Save cecil/1931df62e668262b42b2cfd653655e77 to your computer and use it in GitHub Desktop.
imgur checkem bookmarklet
javascript:(function(){
var e=document.getElementsByClassName("image-placeholder"),
l="<html><head></head><body>checkem",
m=window.open("","ants","scrollbars=1,resizable=1"),
re=/_d.webp.*/;
for(var n=0;n<e.length;n+=1)
imgslug=e[n].src,
imgfinal=imgslug.replace(re,".png"),
l+="<img src="+imgfinal+".png ><br>",
console.log(imgfinal);
l+="</body></html>",
m.document.open(),
m.document.write(l),
m.document.close()
})
();
@cecil
Copy link
Author

cecil commented May 4, 2021

automation of clicking the 'load more' button is left as an exercise for the reader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment