Skip to content

Instantly share code, notes, and snippets.

@bryanjvolz
Created November 15, 2019 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanjvolz/1abdbcab6f30a301a09bd165ccd53a8c to your computer and use it in GitHub Desktop.
Save bryanjvolz/1abdbcab6f30a301a09bd165ccd53a8c to your computer and use it in GitHub Desktop.
Auto-Woot function to drop in console for PlugDJ
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