Last active
February 23, 2018 08:23
-
-
Save r8w9a5k/9542353b9953913ca5d83e8b8c341f2f to your computer and use it in GitHub Desktop.
dribbbleBOT.js is a console script that automatically likes dribbble shots.
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
javascript: | |
function run(){ //function run wraps all the code into one run() function | |
var like = document.querySelector(".stats-label"); //select like button | |
var next = document.querySelector(".shot-nav-next"); //select next page | |
function simulateClick (elem) { //core of simulate click function | |
var evt = new MouseEvent('click', { | |
bubbles: true, | |
cancelable: true, | |
view: window | |
}); | |
var canceled = !elem.dispatchEvent(evt); // end of core simulate click function | |
}; | |
if (like.innerHTML == "Like?"){ //if selected like button == "Like?" | |
simulateClick(like); //then like | |
simulateClick(next); //&& go next | |
} | |
else { //else don't like anything and go next | |
simulateClick(next); | |
} | |
} | |
setInterval((run),2000); //setInterval for my run() function to 2000ms | |
void 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment