Created
November 15, 2019 18:02
-
-
Save bryanjvolz/1abdbcab6f30a301a09bd165ccd53a8c to your computer and use it in GitHub Desktop.
Auto-Woot function to drop in console for PlugDJ
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
var thumbsUp = document.getElementsByClassName('btn-like')[0]; | |
var autoThumbsUp = setInterval(function(){ | |
if( !thumbsUp.classList.contains('disabled') && !thumbsUp.classList.contains('clicked') ){ | |
btnClick(thumbsUp); | |
} | |
},50000); | |
var btnClick = function (elem) { | |
var evt = new MouseEvent('click', { | |
bubbles: true, | |
cancelable: true, | |
view: window | |
}); | |
var canceled = !elem.dispatchEvent(evt); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment