Skip to content

Instantly share code, notes, and snippets.

@sysnucleus
Created June 15, 2021 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sysnucleus/6a7af56a6a6abe14a697c691d12d4840 to your computer and use it in GitHub Desktop.
Save sysnucleus/6a7af56a6a6abe14a697c691d12d4840 to your computer and use it in GitHub Desktop.
WebHarvy Zillow Scrolling JS code
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function scrollList() {
list = document.getElementsByClassName('photo-cards')[0];
for (var i = 0; i < list.childElementCount; i++) {
list.children[i].scrollIntoView();
await sleep(100);
}
}
scrollList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment