Last active
August 18, 2019 16:16
-
-
Save WisaniShilumani/5bfaf72f9c64f5a8977396ae4b86c318 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 likeAll = () => { | |
const likes = document.querySelectorAll('.glyphsSpriteHeart__outline__24__grey_9') | |
console.log(`I'm going to like ${likes.length} posts`) | |
likes.forEach(element => { | |
element.click() | |
}) | |
} | |
var scroller = function(by) { | |
window.scrollBy(0, by) | |
} | |
var startInterval = function(scrollBy, speed, endby) { | |
var interval = setInterval(() => { | |
this.scroller(scrollBy) | |
}, speed*1000) | |
setTimeout(() => { | |
clearInterval(interval) | |
likeAll() | |
}, endby*1000) | |
} | |
startInterval(5000, 0.5, 30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment