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
const randInt = (min, max) => Math.floor(Math.random() * (max - min + 1) + min) // min and max included | |
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)) | |
const followersElement = getFollowersElementWithUsername(getUsername()) | |
followersElement.click() | |
function getUsername () { | |
const pageTitleElement = document.getElementsByTagName('h2')[0] | |
if (!pageTitleElement) throw new Error('No title to get username from') | |
return pageTitleElement.innerHTML |