Skip to content

Instantly share code, notes, and snippets.

@B45i
Last active September 20, 2020 19:01
Show Gist options
  • Save B45i/e873d69c926dc26616099e2fb0b16e54 to your computer and use it in GitHub Desktop.
Save B45i/e873d69c926dc26616099e2fb0b16e54 to your computer and use it in GitHub Desktop.
const delayPromise = (timeout) =>
new Promise((resolve) => setTimeout(resolve, timeout));
setInterval(() => {
let btns = Array.from(
document.querySelectorAll('.sqdOP.L3NKy.y3zKF')
).filter((btn) => btn.innerText.toLowerCase() === 'follow');
(btns || []).forEach(async (btn) => {
btn.click();
await delayPromise(100000);
});
let scrollContainer = document.querySelector('.isgrP');
scrollContainer.scrollTop += 2 * scrollContainer.scrollHeight;
}, 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment