Created
November 9, 2014 04:16
-
-
Save ZeroDragon/abd153fd251e32a64e55 to your computer and use it in GitHub Desktop.
batch download images
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
func = function(){ | |
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
timer = setTimeout(function(){ | |
jQuery.noConflict(); | |
jQuery('img').each(function(k,v){ | |
src = jQuery('img').eq(k).attr('src'); | |
jQuery('#deleteME').remove(); | |
anchor = jQuery('<a/>',{ | |
'href' : src, | |
'download' : src, | |
'id':'deleteME' | |
}); | |
jQuery('body').append(anchor); | |
anchor[0].click(); | |
}); | |
},1000); //le damos tiempo para que cargue el jquery | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment