27 lines
629 B
JavaScript
27 lines
629 B
JavaScript
// i85zmo3j i85zmo3j
|
|
|
|
let followerClass = prompt('Enter the class for followers')
|
|
console.log(followerClass)
|
|
|
|
function getfollowers() {
|
|
return document.querySelectorAll(`.${followerClass}`).length
|
|
}
|
|
function scrollAndGetFollowers() {
|
|
window.scrollTo(0, document.body.scrollHeight);
|
|
return getfollowers();
|
|
}
|
|
|
|
// setTimeout(() => { scrollAndGetFollowers() }, 2000);
|
|
|
|
let continuePrinting = true;
|
|
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.key=="s") {
|
|
continuePrinting = false;
|
|
}
|
|
})
|
|
|
|
|
|
setInterval(() => {
|
|
console.log(`This user has ${scrollAndGetFollowers()} followers!`)
|
|
}, 10000); |