Skip to content

Instantly share code, notes, and snippets.

@zettca
Last active April 2, 2017 23:57
Show Gist options
  • Save zettca/df84ff7704359231daa581138b3a6393 to your computer and use it in GitHub Desktop.
Save zettca/df84ff7704359231daa581138b3a6393 to your computer and use it in GitHub Desktop.
Lightshot Gallery img.src getter
// 1. Go to http://prntscr.com/gallery.html > load all images. Get images to imgCodes
var codes = [].slice.call(document.getElementsByClassName("gallery-item")).map((el) => el.getAttribute("data-id36"));
// 2. Go to prntscr-snatcher App. Use the app to get the imgurCodes
var imgurCodes = [];
for (var i=imgCodes.length-1; i>=0; i--){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if (xhttp.readyState == 4 && xhttp.status == 200){
if (xhttp.responseText){
imgurCodes[i] = xhttp.responseText;
}
}
};
xhttp.open("GET", "imgCode/" + imgCodes[i], true);
xhttp.send();
}
// 3. wget the links. voila
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment