Skip to content

Instantly share code, notes, and snippets.

@davidraedev
Created April 30, 2019 02:22
Show Gist options
  • Save davidraedev/60fc6355aab0f5f3c2e8c3f664d3671e to your computer and use it in GitHub Desktop.
Save davidraedev/60fc6355aab0f5f3c2e8c3f664d3671e to your computer and use it in GitHub Desktop.
pic-time gallery saver console
let run = true;
let images = [];
function getLinks() {
$(".block.Image").each(function(){
let link;
try {
link = $(this).find(".img").attr("style");//.match( /(https.*\.jpg)/ )[0];
} catch ( error ) {
console.log( "this", $(this) );
console.log( "img", $(this).find(".img") );
console.log( "style", $(this).find(".img") ).attr("style");
throw error;
}
if ( images.indexOf( link ) === -1 ) {
images.push( link );
}
});
}
function scroll() {
getLinks();
$( "html,body" ).scrollTop( $( "html,body" ).scrollTop() + 100 );
setTimeout( function(){
if ( run ) {
scroll();
}
}, 400 );
}
scroll();
@davidraedev
Copy link
Author

some of the styles are different so you'll have to filter them, there are a lot of duplicates you can ignore

copy with something like $( "body" ).append( <textarea>${ images.join( "\n" ) }</textarea> );

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