Last active
October 24, 2015 05:04
-
-
Save BubuInc/5d123f602a8a1aa26452 to your computer and use it in GitHub Desktop.
Get list of big images in gallery page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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");