Skip to content

Instantly share code, notes, and snippets.

@boogheta
Created October 11, 2022 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boogheta/03f75d5e769e2cb42bfbeaa9a98a4050 to your computer and use it in GitHub Desktop.
Save boogheta/03f75d5e769e2cb42bfbeaa9a98a4050 to your computer and use it in GitHub Desktop.
let scroll = 0;
function handleNextMedia() {
const el = document.querySelector(".Media");
if (!el) {
document.querySelector(".Profile.custom-scroll").scrollTo(0, scroll + 1800);
return setTimeout(() => handleNextMedia(), 5000);
}
$(el).click();
setTimeout(() => {
$(".MediaViewerActions .icon-download").click();
setTimeout(() => {
$(".MediaViewerActions .Button:nth-child(5)").click();
setTimeout(() => {
$(el).remove();
handleNextMedia();
}, 1000);
}, 3000);
}, 1000);
}
handleNextMedia();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment