Created
June 15, 2021 05:12
-
-
Save sysnucleus/6a7af56a6a6abe14a697c691d12d4840 to your computer and use it in GitHub Desktop.
WebHarvy Zillow Scrolling JS code
This file contains 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
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