Skip to content

Instantly share code, notes, and snippets.

@BubuInc
Last active October 24, 2015 05:04
Show Gist options
  • Save BubuInc/5d123f602a8a1aa26452 to your computer and use it in GitHub Desktop.
Save BubuInc/5d123f602a8a1aa26452 to your computer and use it in GitHub Desktop.
Get list of big images in gallery page
// Save as bookmarklet separately (add javascript:) to get in clipboard all the list of big images from hosting like imgspice, imgtwist of a gallery page
// Download them with Free Download Manager
var imgs = document.images, url, str = "", n = 0;
ta = document.createElement("textarea");
for (var i = 0; i < imgs.length; i++) {
url = imgs[i].src;
if(url.match(/\/th\//)) {str += url.replace("/th/","/i/")+"\n"; n++} // imagetwist
else if(url.match(/_t.jpg/)) {str += url.replace("_t.jpg",".jpg")+"\n"; n++} // imgspice
else if(url.match(/imgchili/)) {str += url.replace(/\/\/t/,"//i")+"\n"; n++} // imgchili
}
ta.textContent = str; document.body.appendChild(ta);
ta.select();
document.execCommand('copy');
document.body.removeChild(ta);
console.log(str);
alert("Copied "+n+" image urls");
//THE BOOKMARLET
var imgs = document.images, url, str = "", n = 0; ta = document.createElement("textarea"); for (var i = 0; i < imgs.length; i++) { url = imgs[i].src; if(url.match(/\/th\//)) {str += url.replace("/th/","/i/")+"\n"; n++}else if(url.match(/_t.jpg/)) {str += url.replace("_t.jpg",".jpg")+"\n"; n++}else if(url.match(/imgchili/)) {str += url.replace(/\/\/t/,"//i")+"\n"; n++}} ta.textContent = str; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); console.log(str); alert("Copied "+n+" image urls");
@BubuInc
Copy link
Author

BubuInc commented Jul 7, 2015

var imgs = document.images, url, str = "", n = 0; ta = document.createElement("textarea"); for (var i = 0; i < imgs.length; i++) { url = imgs[i].src; if(url.match(//th//)) {str += url.replace("/th/","/i/")+"\n"; n++}else if(url.match(/_t.jpg/)) {str += url.replace("_t.jpg",".jpg")+"\n"; n++}} ta.textContent = str; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); console.log(str); alert("Copied "+n+" image urls");

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