Created
April 30, 2019 02:22
-
-
Save davidraedev/60fc6355aab0f5f3c2e8c3f664d3671e to your computer and use it in GitHub Desktop.
pic-time gallery saver console
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
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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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>
);